{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from jqdatasdk import *\n",
    "import pandas as pd\n",
    "import os\n",
    "from datetime import datetime,timedelta\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "auth success （JQData现有流量增加活动，详情请咨询JQData管理员，微信号：JQData02）\n"
     ]
    }
   ],
   "source": [
    "#授权\n",
    "auth('13811866763',\"sam155\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['000001.XSHE',\n",
       " '002142.XSHE',\n",
       " '002807.XSHE',\n",
       " '002839.XSHE',\n",
       " '002936.XSHE',\n",
       " '002948.XSHE',\n",
       " '002958.XSHE',\n",
       " '600000.XSHG',\n",
       " '600015.XSHG',\n",
       " '600016.XSHG',\n",
       " '600036.XSHG',\n",
       " '600901.XSHG',\n",
       " '600908.XSHG',\n",
       " '600919.XSHG',\n",
       " '600926.XSHG',\n",
       " '600928.XSHG',\n",
       " '601009.XSHG',\n",
       " '601128.XSHG',\n",
       " '601166.XSHG',\n",
       " '601169.XSHG',\n",
       " '601229.XSHG',\n",
       " '601288.XSHG',\n",
       " '601328.XSHG',\n",
       " '601398.XSHG',\n",
       " '601577.XSHG',\n",
       " '601818.XSHG',\n",
       " '601838.XSHG',\n",
       " '601860.XSHG',\n",
       " '601939.XSHG',\n",
       " '601988.XSHG',\n",
       " '601997.XSHG',\n",
       " '601998.XSHG',\n",
       " '603323.XSHG']"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#券商的行业编码是J67\n",
    "security_code = get_industry_stocks('J67')\n",
    "#银行J66\n",
    "bank_code = get_industry_stocks('J66')\n",
    "bank_code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#券商财经数据所在目录\n",
    "data_dir = \"C:\\\\quanttime\\\\data\\\\security_raw\\\\\"\n",
    "filelist = os.listdir(data_dir)\n",
    "for code in security_code:\n",
    "    filepath = data_dir + code + \".csv\"\n",
    "    filename = code + \".csv\"\n",
    "    if filename not in filelist:\n",
    "        continue\n",
    "    security = pd.read_csv(filepath)\n",
    "    #print (security)\n",
    "    #获取已下载数据的最后时间日期，该日期的下两天作为更新日期的开始，下一天作为初始日期取第一次数据\n",
    "    enddate = security['day'].iloc[-1]\n",
    "    if '/' in enddate:\n",
    "        startdate = datetime.strptime(security['day'].iloc[-1],\"%Y/%m/%d\") + timedelta(days=2)\n",
    "        initialdate = datetime.strptime(security['day'].iloc[-1],\"%Y/%m/%d\") + timedelta(days=1)\n",
    "        print (startdate)\n",
    "    elif '-' in enddate:\n",
    "        startdate = datetime.strptime(security['day'].iloc[-1],\"%Y-%m-%d\") + timedelta(days=2)\n",
    "        initialdate = datetime.strptime(security['day'].iloc[-1],\"%Y-%m-%d\") + timedelta(days=1)\n",
    "        print (startdate)\n",
    "    else:\n",
    "        print (code)\n",
    "    \n",
    "    startdata = startdate.date()\n",
    "    initialdate = initialdate.date()\n",
    "    today=datetime.now().date()\n",
    "    \n",
    "    q = query(valuation).filter(valuation.code == code)\n",
    "    date = pd.date_range(startdata,today)\n",
    "    df = get_fundamentals(q,initialdate)\n",
    "    \n",
    "    for i in date:\n",
    "        tmp = get_fundamentals(q,i)\n",
    "        df = pd.concat([df,tmp])\n",
    "    \n",
    "    if os.path.exists(filename):\n",
    "        df.to_csv(filepath,mode='a',header=None)\n",
    "    else:\n",
    "        df.to_csv(filepath)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "data_dir = \"C:\\\\quanttime\\\\data\\\\security_raw\\\\\"\n",
    "\n",
    "filename = data_dir + \"000166.XSHE\" + \".csv\"\n",
    "print (filename)\n",
    "security = pd.read_csv(filename)\n",
    "print (se)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from datetime import datetime,timedelta\n",
    "startdate=datetime.strptime(security['day'].iloc[-1],\"%Y-%m-%d\") + timedelta(days=1)\n",
    "\n",
    "print (startdate.date().strftime(\"%Y-%m-%d\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "startdate=datetime.strptime(\"2005/6/24\",\"%Y/%m/%d\") + timedelta(days=1)\n",
    "\n",
    "print (startdate.date().strftime(\"%Y-%m-%d\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q = query(finance.STK_AH_PRICE_COMP).filter(finance.STK_AH_PRICE_COMP.a_code==\"600030.XSHG\",finance.STK_AH_PRICE_COMP.day>='2006-01-01').order_by(finance.STK_AH_PRICE_COMP.day)\n",
    "df = finance.run_query(q)\n",
    "df = df[['day','name','a_price','h_price','h_a_comp']]\n",
    "print(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from jaqs.data import DataApi\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "api = DataApi(addr=\"tcp://data.quantos.org:8910\")\n",
    "token = \"eyJhbGciOiJIUzI1NiJ9.eyJjcmVhdGVfdGltZSI6IjE1MTI4Nzg4NDI2OTkiLCJpc3MiOiJhdXRoMCIsImlkIjoiMTM4MTE4NjY3NjMifQ.FsAb_NOHNcfnTYx8KQPIgSEPcfxS9C_gxiMYuDFI5SA\"\n",
    "api.login(\"13811866763\",token)\n",
    "df,msg = api.daily(symbol=\"600030.SH\",start_date='2016-01-01',end_date='2018-06-30',field=\"\",adjust_mode=\"post\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "msg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from opendatatools import fx\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df,msg = fx.get_hist_cny_cpr(start_date='2016-01-01',end_date='2018-06-30')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q1 = query(security_indicator).filter(security_indicator.code == '600837.XSHG')\n",
    "df = get_fundamentals(q1, statDate=\"2017q1\")\n",
    "if df.empty:\n",
    "    print (\"Empty DataFrame\")\n",
    "print(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q2 = query(indicator).filter(indicator.code == \"600837.XSHG\")\n",
    "df = get_fundamentals(q2,statDate=\"2017\")\n",
    "print(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "allStocks = get_all_securities(types=[],date=None)\n",
    "allStocks.to_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_security_info.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "stock_info = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info.csv\",encoding='gbk')\n",
    "print (stock_info.head(5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "stock_info.iloc[0,0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "stock_info = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info.csv\", index_col=\"code\", encoding=\"gbk\")\n",
    "print(stock_info.head(5))\n",
    "code = \"601318.XSHG\"\n",
    "name = stock_info.loc[code,[\"display_name\"]]\n",
    "print(\"=========\")\n",
    "print (name['display_name'])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "create_dir_name =  code + name['display_name']\n",
    "print (create_dir_name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "if not os.path.exists(create_dir_name):\n",
    "    os.mkdir(create_dir_name)\n",
    "else:\n",
    "    print(\"the dir is existed!!!\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "stock_info = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info.csv\",encoding='gbk')\n",
    "print (stock_info.head(5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "print(stock_info.iloc[0,3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table_name = ['valuation', 'balance', 'cash_flow', 'income', 'indicator']\n",
    "rootpath = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "end_time = datetime.today().date()\n",
    "start_time = datetime.strptime(stock_info.iloc[0,3], \"%Y/%m/%d\")+ timedelta(days=180)\n",
    "compare_time = datetime.strptime(\"2006-01-01\",\"%Y-%m-%d\")\n",
    "if start_time < compare_time:\n",
    "    start_time = compare_time\n",
    "q = query(valuation).filter(valuation.code == stock_info.iloc[0,0])\n",
    "if end_time > start_time.date():\n",
    "    dates = pd.date_range(start_time, end_time)\n",
    "    #print(dates)\n",
    "    df_valuation = get_fundamentals(q,\"2006-01-01\")\n",
    "    filepath = rootpath + str(stock_info.iloc[0,0]) + \".csv\"\n",
    "    for date in dates:\n",
    "        tmp = get_fundamentals(q,date)\n",
    "        df_valuation = pd.concat([df_valuation,tmp])\n",
    "    df_valuation.to_csv(filepath)\n",
    "    print(\"successful\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dt1=datetime.strptime(\"2018-07-02\",\"%Y-%m-%d\")+timedelta(days=40)\n",
    "dt2=datetime.today().date()\n",
    "print(dt1)\n",
    "print(dt2)\n",
    "if dt1.date()>dt2:\n",
    "    print (\"dt1<dt2\")\n",
    "else:\n",
    "    print (\"dt1>=dt2\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "start_time = datetime.strptime(stock_info.iloc[0,3], \"%Y/%m/%d\")+ timedelta(days=180)\n",
    "print(type(start_time))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q = query(valuation).filter(valuation.code == \"601318.XSHG\")\n",
    "df = get_fundamentals(q,\"2006-01-04\")\n",
    "df2=get_fundamentals(q,\"2016-01-04\")\n",
    "df=pd.concat([df,df2])\n",
    "print(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table_name = ['valuation', 'balance', 'cash_flow', 'income', 'indicator']\n",
    "rootpath = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "end_time = datetime.today().date()\n",
    "start_time = datetime.strptime(stock_info.iloc[0,3], \"%Y/%m/%d\")+ timedelta(days=180)\n",
    "compare_time = datetime.strptime(\"2006-01-01\",\"%Y-%m-%d\")\n",
    "if start_time < compare_time:\n",
    "    start_time = compare_time\n",
    "\n",
    "    \n",
    "for i in range(1,len(stock_info)):\n",
    "    q = query(valuation).filter(valuation.code == stock_info.iloc[i,0])\n",
    "    if end_time > start_time.date():\n",
    "        dates = pd.date_range(start_time, end_time)\n",
    "        #print(dates)\n",
    "        df_valuation = get_fundamentals(q,\"2006-01-01\")\n",
    "        filepath = rootpath + str(stock_info.iloc[i,0]) + \".csv\"\n",
    "        for date in dates:\n",
    "            tmp = get_fundamentals(q,date)\n",
    "            df_valuation = pd.concat([df_valuation,tmp])\n",
    "        df_valuation.to_csv(filepath)\n",
    "        print(\"successful\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(0,len(stock_info)):\n",
    "    print (i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table_name = ['valuation', 'balance', 'cash_flow', 'income', 'indicator']\n",
    "#update数据的文件夹路径\n",
    "valuation_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "balance_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\balance\\\\\"\n",
    "cash_flow_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\cash_flow\\\\\"\n",
    "income_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\income\\\\\"\n",
    "indicator_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\indicator\\\\\"\n",
    "\n",
    "#获取所有stock信息\n",
    "stock_info = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info.csv\",encoding='gbk')\n",
    "\n",
    "statdate=[\"2006q1\",\"2006q2\",\"2006q3\",\"2006q4\",\"2006\", \\\n",
    "          \"2007q1\",\"2007q2\",\"2007q3\",\"2007q4\",\"2007\", \\\n",
    "          \"2008q1\",\"2008q2\",\"2008q3\",\"2008q4\",\"2008\", \\\n",
    "          \"2009q1\",\"2009q2\",\"2009q3\",\"2009q4\",\"2009\", \\\n",
    "          \"2010q1\",\"2010q2\",\"2010q3\",\"2010q4\",\"2010\", \\\n",
    "          \"2011q1\",\"2011q2\",\"2011q3\",\"2011q4\",\"2011\", \\\n",
    "          \"2012q1\",\"2012q2\",\"2012q3\",\"2012q4\",\"2012\", \\\n",
    "          \"2013q1\",\"2013q2\",\"2013q3\",\"2013q4\",\"2013\", \\\n",
    "          \"2014q1\",\"2014q2\",\"2014q3\",\"2014q4\",\"2014\", \\\n",
    "          \"2015q1\",\"2015q2\",\"2015q3\",\"2015q4\",\"2015\", \\\n",
    "          \"2016q1\",\"2016q2\",\"2016q3\",\"2016q4\",\"2016\", \\\n",
    "          \"2017q1\",\"2017q2\",\"2017q3\",\"2017q4\",\"2017\", \\\n",
    "          \"2018q1\",\"2018q2\",\"2018q3\",\"2018q4\",\"2018\"]\n",
    "\n",
    "#获取balance表\n",
    "for i in range(0,len(stock_info)):\n",
    "    filepath = balance_file_path + str(stock_info.iloc[i,0]) + \".csv\"\n",
    "    q = query(balance).filter(balance.code == stock_info.iloc[i,0])\n",
    "    df_balance = get_fundamentals(q,statDate = \"2006q1\")\n",
    "    for date in statdate:\n",
    "        tmp = get_fundamentals(q,statDate=date)\n",
    "        df_balance = pd.concat([df_balance,tmp])\n",
    "    df_balance.to_csv(filepath)\n",
    "    print(\"get balance code:%r successful\"%(stock_info.iloc[i,0]))\n",
    "    \n",
    "#获取cash_flow表\n",
    "for i in range(0,len(stock_info)):\n",
    "    filepath = cash_flow_file_path + str(stock_info.iloc[i,0]) + \".csv\"\n",
    "    q = query(cash_flow).filter(cash_flow.code==stock_info.iloc[i,0])\n",
    "    df_cash = get_fundamentals(q, statDate = \"2006q1\")\n",
    "    for date in statdate:\n",
    "        tmp = get_fundamentals(q,statDate=date)\n",
    "        df_cash = pd.concat([df_cash,tmp])\n",
    "    df_cash.to_csv(filepath)\n",
    "    print(\"get cash flow code:%r successful\"%(stock_info.iloc[i,0]))\n",
    "    \n",
    "#获取income表\n",
    "for i in range(0,len(stock_info)):\n",
    "    filepath = income_file_path + str(stock_info.iloc[i,0]) + \".csv\"\n",
    "    q = query(income).filter(income.code==stock_info.iloc[i,0])\n",
    "    df_income = get_fundamentals(q, statDate = \"2006q1\")\n",
    "    for date in statdate:\n",
    "        tmp = get_fundamentals(q,statDate=date)\n",
    "        df_income = pd.concat([df_income,tmp])\n",
    "    df_income.to_csv(filepath)\n",
    "    print(\"get income code:%r successful\"%(stock_info.iloc[i,0]))\n",
    "    \n",
    "#获取indicator表\n",
    "for i in range(0,len(stock_info)):\n",
    "    filepath = indicator_file_path + str(stock_info.iloc[i,0]) + \".csv\"\n",
    "    q = query(indicator).filter(indicator.code==stock_info.iloc[i,0])\n",
    "    df_indicator = get_fundamentals(q, statDate = \"2006q1\")\n",
    "    for date in statdate:\n",
    "        tmp = get_fundamentals(q,statDate=date)\n",
    "        df_indicator = pd.concat([df_indicator,tmp])\n",
    "    df_indicator.to_csv(filepath)\n",
    "    print(\"get indicator code:%r successful\"%(stock_info.iloc[i,0]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q = query(valuation).filter(valuation.code == \"601318.XSHG\")\n",
    "df_601318 = get_fundamentals_continuously(q, end_date='2018-07-30', count=10000)\n",
    "df_601318.minor_xs('601318.XSHG').to_csv(\"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\601318.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_601318.minor_xs('601318.XSHG').to_csv(\"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\601318.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "valuation_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "for i in range(3063,len(stock_info)):\n",
    "    filepath = valuation_file_path + str(stock_info.iloc[i,0]) + \".csv\"\n",
    "    if(str(stock_info.iloc[i,4]) != \"2200/1/1\"):\n",
    "        print(\"2200\")\n",
    "        continue\n",
    "    q = query(valuation).filter(valuation.code == stock_info.iloc[i,0])\n",
    "    try:\n",
    "        df_valuation = get_fundamentals_continuously(q,end_date=\"2018-07-30\",count=2000)\n",
    "    except KeyError:\n",
    "        print(\"code:%r tuishi\"%(stock_info.iloc[i,0]))\n",
    "        continue\n",
    "    df_valuation.minor_xs(str(stock_info.iloc[i,0])).to_csv(filepath)\n",
    "    print(\"get valuation code:%r successful\"%(stock_info.iloc[i,0]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "endtime = datetime.today().date().strftime(\"%Y-%m-%d\")\n",
    "print(endtime)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#获取所有stock信息\n",
    "stock_info = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info.csv\",encoding='gbk')\n",
    "#1、更新 valuation表\n",
    "end_time = datetime.today().date().strftime(\"%Y-%m-%d\")\n",
    "valuation_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "for i in range(0,1):\n",
    "    file_path = valuation_file_path + str(stock_info.iloc[i, 0]) + \".csv\"\n",
    "    q = query(valuation).filter(valuation.code == stock_info.iloc[i, 0])\n",
    "    df_valuation = get_fundamentals_continuously(q,end_date=end_time,count=5)\n",
    "    if os.path.exists(file_path):\n",
    "        df_valuation.minor_xs(str(stock_info.iloc[i,0])).to_csv(file_path,mode='a',header=None)\n",
    "    else:\n",
    "        df_valuation.minor_xs(str(stock_info.iloc[i,0])).to_csv(file_path)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>money</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-01-02</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-03</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-04</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-07</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-08</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-09</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-10</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-11</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-14</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-15</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-16</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-17</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-18</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-21</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-22</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-23</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-24</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-25</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-28</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-29</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-30</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-31</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-01</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-11</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-12</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-13</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-14</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-15</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-18</th>\n",
       "      <td>4530.2</td>\n",
       "      <td>4669.6</td>\n",
       "      <td>4675.0</td>\n",
       "      <td>4530.2</td>\n",
       "      <td>638.0</td>\n",
       "      <td>587580240.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-19</th>\n",
       "      <td>4694.2</td>\n",
       "      <td>4649.4</td>\n",
       "      <td>4713.0</td>\n",
       "      <td>4607.0</td>\n",
       "      <td>1053.0</td>\n",
       "      <td>980565400.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-30</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-06</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-07</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-08</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-09</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-10</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-13</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-14</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-15</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-16</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-17</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-20</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-21</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-22</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-23</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-24</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-27</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-28</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-29</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-30</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-31</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-03</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-04</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-05</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-06</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-10</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-11</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-12</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-13</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-14</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>108 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close    high     low  volume        money\n",
       "2019-01-02     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-03     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-04     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-07     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-08     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-09     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-10     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-11     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-14     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-15     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-16     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-17     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-18     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-21     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-22     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-23     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-24     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-25     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-28     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-29     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-30     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-01-31     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-01     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-11     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-12     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-13     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-14     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-15     NaN     NaN     NaN     NaN     NaN          NaN\n",
       "2019-02-18  4530.2  4669.6  4675.0  4530.2   638.0  587580240.0\n",
       "2019-02-19  4694.2  4649.4  4713.0  4607.0  1053.0  980565400.0\n",
       "...            ...     ...     ...     ...     ...          ...\n",
       "2019-04-30  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-06  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-07  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-08  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-09  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-10  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-13  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-14  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-15  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-16  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-17  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-20  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-21  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-22  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-23  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-24  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-27  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-28  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-29  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-30  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-05-31  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-03  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-04  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-05  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-06  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-10  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-11  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-12  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-13  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "2019-06-14  5781.2  5781.2  5781.2  5781.2     0.0          0.0\n",
       "\n",
       "[108 rows x 6 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gold_hisdata = get_price('IC1904.CCFX', start_date=\"2019-01-01\", end_date=\"2019-06-15\")\n",
    "gold_hisdata"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>money</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-03-20</th>\n",
       "      <td>5482.0</td>\n",
       "      <td>5470.0</td>\n",
       "      <td>5503.4</td>\n",
       "      <td>5352.2</td>\n",
       "      <td>60872.0</td>\n",
       "      <td>6.621759e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-21</th>\n",
       "      <td>5485.0</td>\n",
       "      <td>5541.4</td>\n",
       "      <td>5628.0</td>\n",
       "      <td>5485.0</td>\n",
       "      <td>68987.0</td>\n",
       "      <td>7.679528e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-22</th>\n",
       "      <td>5560.4</td>\n",
       "      <td>5611.2</td>\n",
       "      <td>5614.0</td>\n",
       "      <td>5470.0</td>\n",
       "      <td>61671.0</td>\n",
       "      <td>6.846269e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-25</th>\n",
       "      <td>5523.0</td>\n",
       "      <td>5518.6</td>\n",
       "      <td>5597.0</td>\n",
       "      <td>5506.6</td>\n",
       "      <td>60231.0</td>\n",
       "      <td>6.691081e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-26</th>\n",
       "      <td>5555.0</td>\n",
       "      <td>5358.0</td>\n",
       "      <td>5559.4</td>\n",
       "      <td>5345.0</td>\n",
       "      <td>61628.0</td>\n",
       "      <td>6.704541e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-27</th>\n",
       "      <td>5389.0</td>\n",
       "      <td>5391.6</td>\n",
       "      <td>5415.0</td>\n",
       "      <td>5313.2</td>\n",
       "      <td>57409.0</td>\n",
       "      <td>6.167107e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-28</th>\n",
       "      <td>5372.6</td>\n",
       "      <td>5318.6</td>\n",
       "      <td>5447.6</td>\n",
       "      <td>5311.2</td>\n",
       "      <td>59915.0</td>\n",
       "      <td>6.448670e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-29</th>\n",
       "      <td>5333.2</td>\n",
       "      <td>5534.4</td>\n",
       "      <td>5555.2</td>\n",
       "      <td>5322.4</td>\n",
       "      <td>65790.0</td>\n",
       "      <td>7.158942e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-01</th>\n",
       "      <td>5574.8</td>\n",
       "      <td>5766.0</td>\n",
       "      <td>5767.4</td>\n",
       "      <td>5574.8</td>\n",
       "      <td>61104.0</td>\n",
       "      <td>6.978878e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-02</th>\n",
       "      <td>5795.2</td>\n",
       "      <td>5746.6</td>\n",
       "      <td>5825.6</td>\n",
       "      <td>5722.6</td>\n",
       "      <td>52935.0</td>\n",
       "      <td>6.124433e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-03</th>\n",
       "      <td>5716.0</td>\n",
       "      <td>5828.6</td>\n",
       "      <td>5852.2</td>\n",
       "      <td>5712.6</td>\n",
       "      <td>52822.0</td>\n",
       "      <td>6.107199e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-04</th>\n",
       "      <td>5858.0</td>\n",
       "      <td>5882.6</td>\n",
       "      <td>5898.0</td>\n",
       "      <td>5792.4</td>\n",
       "      <td>55547.0</td>\n",
       "      <td>6.499134e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-08</th>\n",
       "      <td>5929.0</td>\n",
       "      <td>5800.8</td>\n",
       "      <td>5935.0</td>\n",
       "      <td>5737.4</td>\n",
       "      <td>59401.0</td>\n",
       "      <td>6.930882e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-09</th>\n",
       "      <td>5795.0</td>\n",
       "      <td>5836.8</td>\n",
       "      <td>5863.0</td>\n",
       "      <td>5774.2</td>\n",
       "      <td>52852.0</td>\n",
       "      <td>6.152506e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-10</th>\n",
       "      <td>5806.0</td>\n",
       "      <td>5818.8</td>\n",
       "      <td>5901.0</td>\n",
       "      <td>5747.0</td>\n",
       "      <td>60633.0</td>\n",
       "      <td>7.047502e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-11</th>\n",
       "      <td>5824.8</td>\n",
       "      <td>5721.2</td>\n",
       "      <td>5837.0</td>\n",
       "      <td>5702.0</td>\n",
       "      <td>54574.0</td>\n",
       "      <td>6.295070e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-12</th>\n",
       "      <td>5720.8</td>\n",
       "      <td>5701.2</td>\n",
       "      <td>5740.0</td>\n",
       "      <td>5656.6</td>\n",
       "      <td>47813.0</td>\n",
       "      <td>5.451746e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-15</th>\n",
       "      <td>5788.8</td>\n",
       "      <td>5609.0</td>\n",
       "      <td>5806.2</td>\n",
       "      <td>5589.0</td>\n",
       "      <td>58113.0</td>\n",
       "      <td>6.646973e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-16</th>\n",
       "      <td>5596.6</td>\n",
       "      <td>5759.2</td>\n",
       "      <td>5765.2</td>\n",
       "      <td>5555.8</td>\n",
       "      <td>54778.0</td>\n",
       "      <td>6.195894e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-17</th>\n",
       "      <td>5761.0</td>\n",
       "      <td>5772.4</td>\n",
       "      <td>5831.8</td>\n",
       "      <td>5733.4</td>\n",
       "      <td>46711.0</td>\n",
       "      <td>5.396898e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-18</th>\n",
       "      <td>5777.6</td>\n",
       "      <td>5765.2</td>\n",
       "      <td>5802.0</td>\n",
       "      <td>5736.4</td>\n",
       "      <td>29376.0</td>\n",
       "      <td>3.392946e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-19</th>\n",
       "      <td>5777.0</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5799.0</td>\n",
       "      <td>5708.6</td>\n",
       "      <td>15478.0</td>\n",
       "      <td>1.782617e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-22</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-23</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-24</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-25</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-26</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-29</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-30</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-06</th>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>5781.2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000e+00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close    high     low   volume         money\n",
       "2019-03-20  5482.0  5470.0  5503.4  5352.2  60872.0  6.621759e+10\n",
       "2019-03-21  5485.0  5541.4  5628.0  5485.0  68987.0  7.679528e+10\n",
       "2019-03-22  5560.4  5611.2  5614.0  5470.0  61671.0  6.846269e+10\n",
       "2019-03-25  5523.0  5518.6  5597.0  5506.6  60231.0  6.691081e+10\n",
       "2019-03-26  5555.0  5358.0  5559.4  5345.0  61628.0  6.704541e+10\n",
       "2019-03-27  5389.0  5391.6  5415.0  5313.2  57409.0  6.167107e+10\n",
       "2019-03-28  5372.6  5318.6  5447.6  5311.2  59915.0  6.448670e+10\n",
       "2019-03-29  5333.2  5534.4  5555.2  5322.4  65790.0  7.158942e+10\n",
       "2019-04-01  5574.8  5766.0  5767.4  5574.8  61104.0  6.978878e+10\n",
       "2019-04-02  5795.2  5746.6  5825.6  5722.6  52935.0  6.124433e+10\n",
       "2019-04-03  5716.0  5828.6  5852.2  5712.6  52822.0  6.107199e+10\n",
       "2019-04-04  5858.0  5882.6  5898.0  5792.4  55547.0  6.499134e+10\n",
       "2019-04-08  5929.0  5800.8  5935.0  5737.4  59401.0  6.930882e+10\n",
       "2019-04-09  5795.0  5836.8  5863.0  5774.2  52852.0  6.152506e+10\n",
       "2019-04-10  5806.0  5818.8  5901.0  5747.0  60633.0  7.047502e+10\n",
       "2019-04-11  5824.8  5721.2  5837.0  5702.0  54574.0  6.295070e+10\n",
       "2019-04-12  5720.8  5701.2  5740.0  5656.6  47813.0  5.451746e+10\n",
       "2019-04-15  5788.8  5609.0  5806.2  5589.0  58113.0  6.646973e+10\n",
       "2019-04-16  5596.6  5759.2  5765.2  5555.8  54778.0  6.195894e+10\n",
       "2019-04-17  5761.0  5772.4  5831.8  5733.4  46711.0  5.396898e+10\n",
       "2019-04-18  5777.6  5765.2  5802.0  5736.4  29376.0  3.392946e+10\n",
       "2019-04-19  5777.0  5781.2  5799.0  5708.6  15478.0  1.782617e+10\n",
       "2019-04-22  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-04-23  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-04-24  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-04-25  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-04-26  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-04-29  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-04-30  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00\n",
       "2019-05-06  5781.2  5781.2  5781.2  5781.2      0.0  0.000000e+00"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gold_hisdata.iloc[50:80]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>IC1904.CCFX</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2019-04-17</th>\n",
       "      <td>5783.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-18</th>\n",
       "      <td>5778.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-19</th>\n",
       "      <td>5779.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-22</th>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            IC1904.CCFX\n",
       "2019-04-17       5783.6\n",
       "2019-04-18       5778.4\n",
       "2019-04-19       5779.8\n",
       "2019-04-22          NaN"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "get_extras(\"futures_sett_price\",[\"IC1904.CCFX\"],start_date=\"2019-04-17\", end_date=\"2019-04-22\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "gold_hisdata.index.name = \"date\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "gold_hisdata.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "gold_hisdata.to_csv(\"C:\\\\quanttime\\\\data\\\\gold\\\\sh_future\\\\gold.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "gold = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\gold\\\\sh_future\\\\gold.csv\",index_col=[\"date\"])\n",
    "gold.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "d1 = datetime.strptime(gold.index[-1],'%Y-%m-%d')\n",
    "d2 = datetime.strptime(gold.index[0],'%Y-%m-%d')\n",
    "\n",
    "delta = d1 - d2\n",
    "delta2 = timedelta(days=1)\n",
    "if delta.days > 0:\n",
    "    d1 = d1+delta2\n",
    "    endtime = d1.strftime('%Y-%m-%d')\n",
    "else:\n",
    "    d2 = d2 + delta2\n",
    "    endtime = d2.trftime('%Y-%m-%d')\n",
    "\n",
    "endtime"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_all_securities(types=['index'], date=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index_1 = pd.DataFrame(columns=[\"display_name\",\"date\",\"weight\"],index=['code'])\n",
    "index_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index_2 = get_index_weights(\"399975.XSHE\",\"2018-02-27\")\n",
    "index_2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index399975 = pd.concat([index_1,index_2]).dropna()\n",
    "#index399975.to_csv(\"C:\\\\quanttime\\\\data\\\\index\\\\weights\\\\399975.XSHE.csv\",encoding=\"gbk\")\n",
    "index399975.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index399975 = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\index\\\\weights\\\\399975.XSHE.csv\",encoding=\"gbk\",index_col=[\"date\",\"code\"])\n",
    "index399975"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index399975.index.levels[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in index399975.index.levels[0]:\n",
    "    print (i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dt1 = []\n",
    "for i in index399975.index.levels[0]:\n",
    "    if '/' in i:\n",
    "        dt1.append(datetime.strptime(i,\"%Y/%m/%d\"))\n",
    "    if '-' in i:\n",
    "        dt1.append(datetime.strptime(i,\"%Y-%m-%d\"))\n",
    "dt1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index_all_info_dir = \"C:\\\\quanttime\\\\data\\\\basic_info\\\\index_all_info.csv\"\n",
    "index_all_info = pd.read_csv(index_all_info_dir, index_col=[\"code\"], encoding=\"gbk\")\n",
    "data_dir = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "index_dir = \"C:\\\\quanttime\\\\data\\\\index\\\\index_valuation\\\\\"\n",
    "index_all_info.index\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_list = ['399975.XSHE']\n",
    "for index_code in test_list:\n",
    "    stocks = get_index_stocks(index_code, \"2018-12-10\")\n",
    "    print(stocks)\n",
    "    \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "dates = pd.date_range(\"2006-01-01\",\"2018-12-18\")\n",
    "df_valuation_all = pd.DataFrame(columns=[\"pb_ratio\", \"pe_ratio\"], index=dates)\n",
    "df_valuation_all.index.name = \"day\"\n",
    "df_valuation_all\n",
    "file_path = data_dir + '600030.XSHG' + '.csv'\n",
    "df_valuation = pd.read_csv(file_path,index_col=['day'], usecols=[\"day\", \"pe_ratio\", \"pb_ratio\"])\n",
    "df_valuation\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "stocks = ['600030.XSHG','600109.XSHG']\n",
    "for code in stocks:\n",
    "    file_path = data_dir + str(code) + '.csv'\n",
    "    df_valuation = pd.read_csv(file_path,index_col=['day'], usecols=[\"day\", \"pe_ratio\", \"pb_ratio\"])\n",
    "    df_valuation_all = pd.merge(df_valuation_all, df_valuation,left_index=True,right_index=True,suffixes=('_%r'%code,'_%r'%code))\n",
    "df_valuation_all.to_csv(index_dir + str(code) +'_raw.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "q = query(valuation).filter(valuation.code == \"601318.XSHG\")\n",
    "df_valuation = get_fundamentals(q, \"2001-10-01\")\n",
    "df_valuation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_valuation1 = get_fundamentals(q, \"2018-10-01\")\n",
    "tmpdf = pd.concat([df_valuation,df_valuation1])\n",
    "tmpdf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "valuation_file_path = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "stock_codes = [\"000002.XSHE\"]\n",
    "for code in stock_codes:\n",
    "    update_file = valuation_file_path + code + \".csv\"\n",
    "    if (os.path.exists(update_file)):\n",
    "        valuation_data = pd.read_csv(update_file)\n",
    "        print(\"去重前，数据行数：%r\"%len(valuation_data.index))\n",
    "valuation_data.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "valuation_data = valuation_data.drop_duplicates('day')\n",
    "#valuation_data = valuation_data[~valuation_data.reset_index().duplicated().values]\n",
    "print(\"去重后，数据行数：%r\"%len(valuation_data.index))\n",
    "valuation_data.to_csv(update_file,index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "d1 = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\",index_col=[\"trade_date\"])\n",
    "d1.loc[\"2005-01-04\"][0]\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_close_trade_date(strDate, direct):\n",
    "    trade_date = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\",index_col=[\"trade_date\"])\n",
    "    if direct == -1:\n",
    "        dates = pd.date_range(end=strDate,periods=10)\n",
    "        dates = list(reversed(dates.tolist()))\n",
    "        for tmpDate in dates:\n",
    "            try:\n",
    "                return trade_date.index[trade_date.index.tolist().index(tmpDate.date().strftime(\"%Y-%m-%d\"))]\n",
    "            except ValueError:\n",
    "                continue\n",
    "    elif direct == 1:\n",
    "        dates = pd.date_range(start=strDate,periods=10)\n",
    "        for tmpDate in dates.tolist():\n",
    "            try:\n",
    "                return trade_date.index[trade_date.index.tolist().index(tmpDate.date().strftime(\"%Y-%m-%d\"))]\n",
    "            except ValueError:\n",
    "                continue\n",
    "    else:\n",
    "        return strDate\n",
    "    return strDate\n",
    "\n",
    "get_close_trade_date(\"2018-10-05\",1)\n",
    "    \n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.date_range(end=\"2018-10-01\",periods=10)\n",
    "df = list(reversed(df.tolist()))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.loc['2018-12-28',['close']].close"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "current_date = (datetime.today().date()-timedelta(1)).strftime(\"%Y-%m-%d\")\n",
    "current_df = get_price(\"399975.XSHE\", start_date=current_date, end_date=current_date, frequency='daily',\n",
    "                                   fields=None)\n",
    "print(current_date)\n",
    "print(current_df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_trade_list(startDate, endDate):\n",
    "    trade_date = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\",index_col=[\"trade_date\"])\n",
    "    \n",
    "    start = trade_date.loc[startDate][0]\n",
    "    end = trade_date.loc[endDate][0]\n",
    "    trade_days = trade_date.iloc[start:end,0]\n",
    "    return trade_days.index.tolist()\n",
    "    \n",
    "get_trade_list(\"2018-10-08\",\"2018-10-16\")  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "isinstance(\"2018-10-01\",str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# %load c://quanttime//src/index//get_index_trade_event.py\n",
    "__author__ = 'Administrator'\n",
    "import sys\n",
    "\n",
    "import tushare as ts\n",
    "from datetime import datetime, timedelta\n",
    "import pandas as pd\n",
    "import logging\n",
    "from jqdatasdk import *\n",
    "from prettytable import PrettyTable\n",
    "\n",
    "\n",
    "def indexTrade():\n",
    "    '''\n",
    "    功能：通过比较10,20日等的收盘价，判断是否买入或者卖出\n",
    "    当前比较基准有：\n",
    "    1、当前价格与20日前收盘价进行比较，如果高则买入，如果低则卖出\n",
    "    2、当前价格与20日前收盘价进行比较，如果高则买入，当前价格与10日前收盘价比较，如果低则卖出\n",
    "    3、当前价格与76日前收盘价进行比较，如果高则买入，当前价格与33日前收盘价比较，如果低则卖出\n",
    "    :return:\n",
    "    '''\n",
    "    auth('13811866763', \"sam155\")  # jqdata 授权\n",
    "    # 所用文件目录如下：\n",
    "    index_basic_info_dir = \"C:\\\\quanttime\\\\data\\\\basic_info\\\\index_trade.csv\"\n",
    "    index_k_dir = \"C:\\\\quanttime\\\\data\\\\index\\\\jq\\\\\"\n",
    "    #index 基本信息等\n",
    "    df_index_info = pd.read_csv(index_basic_info_dir, index_col=[\"code\"], encoding=\"gbk\")\n",
    "\n",
    "    all_trade_day = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\", index_col=[\"trade_date\"])\n",
    "\n",
    "    result = []\n",
    "    for index1 in df_index_info.index:\n",
    "        row_record = []\n",
    "        index_file = index_k_dir + str(index1) + \".csv\"\n",
    "        index_name = df_index_info.loc[index1, [\"display_name\"]].display_name\n",
    "        current_date = datetime.today().date().strftime(\"%Y-%m-%d\")\n",
    "        #current_date = \"2018-12-28\" #for test\n",
    "        # 获取当时的价格\n",
    "        current_df = get_price(index1, start_date=current_date, end_date=current_date, frequency='daily', fields=None)\n",
    "        # print(index_name)\n",
    "        row_record.append(index_name)\n",
    "        try:\n",
    "            index_k_data = pd.read_csv(index_file, index_col=[\"date\"])\n",
    "            row_record.append(current_date)\n",
    "            # 1、与前20天的情况比较，当前持有则低于前20日收盘价则卖出，当前空仓则高于前20日收盘价则买入\n",
    "            back_trace = 20\n",
    "            if all_trade_day.index.tolist().index(current_date) - back_trace >= 0:\n",
    "                pre_date = all_trade_day.index[all_trade_day.index.tolist().index(current_date) - back_trace]\n",
    "                pre_value = index_k_data.loc[pre_date, ['close']].close\n",
    "                current = current_df.loc[current_date,['close']].close #当前的close价格\n",
    "                if float(pre_value) > float(current):\n",
    "                    # compare = u'当前close低于20日前close'\n",
    "                    compare = 'sell c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "                    # print(\"%r-%r 当前价格低于20日前\"%(index1,index_name))\n",
    "                else:\n",
    "                    # compare = u'当前close高于（或等于）20日前close'\n",
    "                    compare = 'buy c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "                    # print(\"%r-%r 当前价格高于20日前\"%(index1,index_name))\n",
    "                # 2、前20日收盘价，前10日收盘价情况比较，当前持有则低于前10日收盘价则卖出，当前空仓则高于前20日收盘价则买入\n",
    "                back_trace = 10\n",
    "                pre_date = all_trade_day.index[all_trade_day.index.tolist().index(current_date) - back_trace]\n",
    "                pre_value = index_k_data.loc[pre_date, ['close']].close\n",
    "                if float(current) >= float(pre_value):\n",
    "                    # compare = u'当前close高于等于20日前close'\n",
    "                    compare = 'buy c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "                elif float(current) < float(index_k_data.loc[pre_date, ['close']].close):\n",
    "                    # compare = u'当前close低于10日前close'\n",
    "                    compare = 'sell c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "                else:\n",
    "                    # compare = u'当前close介于20日前close与10日前close之间'\n",
    "                    compare = 'hold c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "            # 3、买入与前76日收盘价比较，卖出与33日收盘价比较，即当前close高于前76日close则买入或继续持有，当前close低于前33日close则卖出\n",
    "            back_trace = 76\n",
    "            if all_trade_day.index.tolist().index(current_date) - back_trace >= 0:\n",
    "                pre_date = all_trade_day.index[all_trade_day.index.tolist().index(current_date) - back_trace]\n",
    "                pre_date_33 = all_trade_day.index[all_trade_day.index.tolist().index(current_date) - 33]\n",
    "                pre_value = index_k_data.loc[pre_date, ['close']].close\n",
    "                #current = index_k_data.loc[current_date, ['close']].close\n",
    "                # print(pre_value)\n",
    "                # print(current)\n",
    "                if float(current) >= float(pre_value):\n",
    "                    # compare = u'当前close高于等于76日前close'\n",
    "                    compare = 'buy c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "                elif float(current) < float(index_k_data.loc[pre_date_33, ['close']].close):\n",
    "                    # compare = u'当前close低于33日前close'\n",
    "                    compare = 'sell c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "                else:\n",
    "                    # compare = u'当前close介于76日前close与33日前close之间'\n",
    "                    compare = 'hold c:%r vs p:%r '%(current,pre_value)\n",
    "                    row_record.append(compare)\n",
    "        except:\n",
    "            print(\"%r process error\" % index1)\n",
    "            continue\n",
    "        # print(row_record)\n",
    "        result.append(row_record)\n",
    "    df_columns = ['index_name', 'date', '20buy VS 20sell', u'20buy VS 10sell', u'76buy vs 33sell']\n",
    "    df = pd.DataFrame(data=result, index=df_index_info.index, columns=df_columns)\n",
    "    buy_sell_table = PrettyTable(df_columns)\n",
    "    buy_sell_table.align['index_name'] = \"l\"\n",
    "    buy_sell_table.padding_width = 1\n",
    "    for row_value in result:\n",
    "        buy_sell_table.add_row(row_value)\n",
    "    #print(df.head(5))\n",
    "    print(buy_sell_table)\n",
    "\n",
    "#============================================================================================\n",
    "def index_rotation():\n",
    "    '''\n",
    "    功能：指数轮动，即常见的如二八轮动，二八轮动plus\n",
    "    1、二八轮动。即采用沪深300与中证500指数作为轮动标的，当前价格与20日前close价格对比，哪个涨幅大持有哪个，都下跌则不持有\n",
    "    2、二八轮动plus，则在上诉基础上加入一个均值判断，即在判断哪个涨幅大的基础上，在与19,20,21日三天的均值进行比较，大于/小于均值才转换\n",
    "    :return:\n",
    "    '''\n",
    "\n",
    "    #比较的指数对,当前沪深300VS中证500，沪深300VS创业板50\n",
    "    compare_indexs_list = [[\"000300.XSHG\", \"399905.XSHE\"],[\"000300.XSHG\", \"399673.XSHE\"]]\n",
    "    auth('13811866763', \"sam155\")  # jqdata 授权\n",
    "    # 所用文件目录如下：\n",
    "    index_basic_info_dir = \"C:\\\\quanttime\\\\data\\\\basic_info\\\\index_trade.csv\"\n",
    "    index_k_dir = \"C:\\\\quanttime\\\\data\\\\index\\\\jq\\\\\"\n",
    "    # index 基本信息等\n",
    "    df_index_info = pd.read_csv(index_basic_info_dir, index_col=[\"code\"], encoding=\"gbk\")\n",
    "\n",
    "    all_trade_day = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\", index_col=[\"trade_date\"])\n",
    "\n",
    "\n",
    "    row_record = []\n",
    "    for index_pair in compare_indexs_list:\n",
    "        if len(index_pair) != 2:\n",
    "            continue\n",
    "\n",
    "        #===============\n",
    "        pre_value_list = [] #存放tmp_pre_list，即两个指数的21,20,19的close值，其中分别是两个list，放在pre_value_list中\n",
    "        current_list = []\n",
    "        index_name_list = []\n",
    "        current_date = datetime.today().date().strftime(\"%Y-%m-%d\")\n",
    "        #current_date = \"2018-12-28\" #for test\n",
    "        for index in index_pair:\n",
    "            tmp_pre_list = []  # 用于暂时存储21,20,19的close值\n",
    "            index_file = index_k_dir + str(index) + \".csv\"\n",
    "            index_name = df_index_info.loc[index, [\"display_name\"]].display_name\n",
    "            index_name_list.append(index_name)\n",
    "            # 获取当时的价格\n",
    "            current_df = get_price(index, start_date=current_date, end_date=current_date, frequency='daily',\n",
    "                                   fields=None)\n",
    "            if current_df.empty:\n",
    "                print(\"index: %r  get price empty check date!!!\")\n",
    "                continue\n",
    "            current_list.append(current_df.loc[current_date, ['close']].close)   # 当前的close价格\n",
    "            index_k_data = pd.read_csv(index_file, index_col=[\"date\"])\n",
    "\n",
    "            # 21,20,19\n",
    "            for back_trace in range(21, 18, -1):\n",
    "                if all_trade_day.index.tolist().index(current_date) - back_trace >= 0:\n",
    "                    pre_date = all_trade_day.index[all_trade_day.index.tolist().index(current_date) - back_trace]\n",
    "                    pre_value = index_k_data.loc[pre_date, ['close']].close\n",
    "                    tmp_pre_list.append(float(pre_value))\n",
    "\n",
    "            pre_value_list.append(tmp_pre_list)\n",
    "\n",
    "        print(pre_value_list)\n",
    "        #1、二八轮动判断\n",
    "        index0 = float(current_list[0]) > float(pre_value_list[0][1])\n",
    "        print(\"index:%r(%r),current close:%r,before 20day close:%r\" % \\\n",
    "              (index_pair[0],index_name_list[0],current_list[0],pre_value_list[0][1]))\n",
    "        index1 = float(current_list[1]) > float(pre_value_list[1][1])\n",
    "        print(\"index:%r(%r),current close:%r,before 20day close:%r\" % \\\n",
    "              (index_pair[1], index_name_list[1], current_list[1], pre_value_list[1][1]))\n",
    "\n",
    "        if index0 and index1: #两个指数都比各自的20日前的close价高，两个指数都进入买入门槛\n",
    "            index0_diff = (float(current_list[0]) - float(pre_value_list[0][1]))/ float(pre_value_list[0][1])\n",
    "            index1_diff = (float(current_list[1]) - float(pre_value_list[1][1]))/ float(pre_value_list[1][1])\n",
    "            if index0_diff > index1_diff:\n",
    "                result = \"buy %r(%r)\"%(index_pair[0],index_name_list[0])\n",
    "            elif index0_diff < index1_diff:\n",
    "                result = \"buy %r(%r)\"%(index_pair[1],index_name_list[1])\n",
    "            else:\n",
    "                result = \"%r(%r),%r(%r) amount of increase equality\"% \\\n",
    "                         (index_pair[0],index_name_list[0],index_pair[1],index_name_list[1])\n",
    "        elif index0 and (not index1):# index0>0.index1<0,取index0\n",
    "            result = \"buy %r(%r)\" % (index_pair[0], index_name_list[0])\n",
    "        elif (not index0) and index1:\n",
    "            result = \"buy %r(%r)\" % (index_pair[1], index_name_list[1])\n",
    "        else:\n",
    "            result = \"sell %r(%r),%r(%r) all\"%(index_pair[0],index_name_list[0],index_pair[1],index_name_list[1])\n",
    "\n",
    "        tmp_row_result = [\"28stander\", current_date, result]\n",
    "        row_record.append(tmp_row_result)\n",
    "\n",
    "        #2、二八轮动plus\n",
    "        #19,20,21,三天收盘价的均值\n",
    "        pre_index0_mean = sum(pre_value_list[0]) / len(pre_value_list[0])\n",
    "        pre_index1_mean = sum(pre_value_list[1]) / len(pre_value_list[1])\n",
    "        index0 = float(current_list[0]) > float(pre_index0_mean)\n",
    "        print(\"index:%r(%r),current close:%r,before 20day !!mean!! close:%r\" % \\\n",
    "              (index_pair[0], index_name_list[0], current_list[0], pre_index0_mean))\n",
    "        index1 = float(current_list[1]) > float(pre_index1_mean)\n",
    "        print(\"index:%r(%r),current close:%r,before 20day !!mean!! close:%r\" % \\\n",
    "              (index_pair[1], index_name_list[1], current_list[1], pre_index1_mean))\n",
    "\n",
    "        if index0 and index1: #两个指数都比各自的20日前平均的close价高，两个指数都进入买入门槛\n",
    "            index0_diff = (float(current_list[0]) - pre_index0_mean)/ pre_index0_mean\n",
    "            index1_diff = (float(current_list[1]) - pre_index1_mean)/ pre_index1_mean\n",
    "            if index0_diff > index1_diff:\n",
    "                result = \"buy %r(%r)\"%(index_pair[0],index_name_list[0])\n",
    "            elif index0_diff < index1_diff:\n",
    "                result = \"buy %r(%r)\"%(index_pair[1],index_name_list[1])\n",
    "            else:\n",
    "                result = \"%r(%r),%r(%r) amount of increase equality\"% \\\n",
    "                         (index_pair[0],index_name_list[0],index_pair[1],index_name_list[1])\n",
    "        elif index0 and (not index1):# index0>0.index1<0,取index0\n",
    "            result = \"buy %r(%r)\" % (index_pair[0], index_name_list[0])\n",
    "        elif (not index0) and index1:\n",
    "            result = \"buy %r(%r)\" % (index_pair[1], index_name_list[1])\n",
    "        else:\n",
    "            result = \"sell %r(%r),%r(%r) all\"%(index_pair[0],index_name_list[0],index_pair[1],index_name_list[1])\n",
    "\n",
    "        tmp_row_result = [\"28 plus\", current_date, result]\n",
    "        row_record.append(tmp_row_result)\n",
    "\n",
    "    table_columns = ['strategy_name', 'date', \"result\"]\n",
    "    buy_sell_table = PrettyTable(table_columns)\n",
    "    buy_sell_table.align['strategy_name'] = \"l\"\n",
    "    buy_sell_table.padding_width = 1\n",
    "    for row_value in row_record:\n",
    "        buy_sell_table.add_row(row_value)\n",
    "\n",
    "    print(buy_sell_table)\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "if __name__ == \"__main__\":\n",
    "    indexTrade()\n",
    "    index_rotation()\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_index_stocks(\"000004.XSHG\", \"2018-12-28\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "index_all_info_dir = \"C:\\\\quanttime\\\\data\\\\basic_info\\\\index_all_valuation_info.csv\"   \n",
    "index_all_info = pd.read_csv(index_all_info_dir, index_col=[\"code\"], encoding=\"gbk\")\n",
    "for code in index_all_info.index:\n",
    "    print(\"%r len: %r\"%(code,len(get_index_stocks(code, \"2018-12-28\"))))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_close_trade_date(strDate, direct):\n",
    "    '''\n",
    "        功能：获取节假日最近的一个交易日，比如2018-10-1日，的前一个交易日是9-28日\n",
    "        这里是生成了一个已strDate为end的，往前推10个日期的时间序列\n",
    "        :param strDate：str类型日期，如\"2018-10-01\"\n",
    "               1:日期之后的交易时间，如2018-10-01日后的交易日期\n",
    "               -1：日期之前的交易时间，如2018-10-01日前的交易日期\n",
    "        :return:str 类型，如果没有找到则返回strDate的值\n",
    "    '''\n",
    "    trade_date = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\", index_col=[\"trade_date\"])\n",
    "    if direct == -1:\n",
    "        dates = pd.date_range(end=strDate, periods=10)\n",
    "        dates = list(reversed(dates.tolist()))\n",
    "        for tmpDate in dates:\n",
    "            try:\n",
    "                return trade_date.index[trade_date.index.tolist().index(tmpDate.date().strftime(\"%Y-%m-%d\"))]\n",
    "            except ValueError:\n",
    "                continue\n",
    "    elif direct == 1:\n",
    "        dates = pd.date_range(start=strDate, periods=10)\n",
    "        for tmpDate in dates.tolist():\n",
    "            try:\n",
    "                return trade_date.index[trade_date.index.tolist().index(tmpDate.date().strftime(\"%Y-%m-%d\"))]\n",
    "            except ValueError:\n",
    "                continue\n",
    "    else:\n",
    "        return strDate\n",
    "    return strDate\n",
    "\n",
    "def get_trade_list(startDate, endDate):\n",
    "    '''\n",
    "    功能：获取startDate, endDate交易日时间段，该时间查表于all_trade_day.csv\n",
    "    :param startDate: str，该值需要在all_trade_day.csv内\n",
    "    :param endDate: str 该值需要在all_trade_day.csv\n",
    "    :return: list\n",
    "    '''\n",
    "    trade_date = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\",index_col=[\"trade_date\"])\n",
    "    try:\n",
    "        start = trade_date.loc[startDate][0]\n",
    "        end = trade_date.loc[endDate][0]\n",
    "    except:\n",
    "        return []\n",
    "    trade_days = trade_date.iloc[start:end, 0]\n",
    "    return trade_days.index.tolist()\n",
    "\n",
    "index_all_info_dir = \"C:\\\\quanttime\\\\data\\\\basic_info\\\\index_all_valuation_info.csv\"\n",
    "index_all_info = pd.read_csv(index_all_info_dir, index_col=[\"code\"], encoding=\"gbk\")\n",
    "data_dir = \"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\\"\n",
    "#df_valuation_all = pd.DataFrame(columns=[\"pb_ratio\", \"pe_ratio\"], index=['day'])\n",
    "for code in index_all_info.index:\n",
    "    start_date = index_all_info.loc[code, [\"start_date\"]].start_date\n",
    "    start_date = get_close_trade_date(start_date, 1)\n",
    "    end_date = \"2018-12-28\"\n",
    "    trade_days = get_trade_list(start_date, end_date)\n",
    "    if \"-\" in start_date:\n",
    "        start_month = datetime.strptime(start_date,\"%Y-%m-%d\").month\n",
    "    if \"/\" in start_date:\n",
    "        start_month = datetime.strptime(start_date,\"%Y/%m/%d\").month\n",
    "    stocks = []\n",
    "    trade_month_list = []\n",
    "    tmp_month_list = []\n",
    "    for day in trade_days:\n",
    "        month = datetime.strptime(day,\"%Y-%m-%d\").month\n",
    "        if start_month == month:\n",
    "            #stocks = get_index_stocks(code, day)  # 指定日期指数各成分股，返回一个list\n",
    "            tmp_month_list.append(day)\n",
    "        else:\n",
    "            trade_month_list.append(tmp_month_list)\n",
    "            tmp_month_list.clear()\n",
    "            tmp_month_list.append(day)\n",
    "            start_month = month\n",
    "        print(tmp_month_list)\n",
    "    #print(trade_month_list)\n",
    "                \n",
    "            \n",
    "    \n",
    "            \n",
    "                    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "df_1 = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\000000.XSHG.csv\",index_col=['day'], \\\n",
    "                                       usecols=[\"day\",\"pe_ratio\",\"pb_ratio\"])\n",
    "df_2 = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\601318.XSHG.csv\",index_col=['day'], \\\n",
    "                                       usecols=[\"day\",\"pe_ratio\",\"pb_ratio\"])\n",
    "suff1 = '_'\n",
    "suff2 = '_%r'%(2)\n",
    "df_3 = pd.merge(df_1,df_2,how=\"outer\",left_index=True,right_index=True,suffixes=(suff1,suff2))\n",
    "df_3[df_3>22] = 0\n",
    "df_3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_valuation = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\finance\\\\valuation\\\\000000.XSHG.csv\",index_col=['day'], \\\n",
    "                                       usecols=[\"day\",\"pe_ratio\",\"pb_ratio\"])\n",
    "            for stock in stocks:\n",
    "                valuation_file = data_dir + str(stock) + '.csv'\n",
    "                if os.path.exists(valuation_file):\n",
    "                    df_tmp = pd.read_csv(stock_path,index_col=['day'], usecols=[\"day\",\"pe_ratio\",\"pb_ratio\"])\n",
    "                    df_tmp = df_tmp[~df_tmp.reset_index().duplicated().values]#去重\n",
    "                    if !df.empty:\n",
    "                        suff2 = '_%r'%(stock[0:7])\n",
    "                        df_valuation = pd.merge(df_valuation,df_tmp,how=\"outer\",left_index=True,right=True,suffixes=('_x',suff2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_index_stocks('399996.XSHE', date=\"2018-12-28\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "trade_date = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_day.csv\",index_col=[\"trade_date\"])\n",
    "start = trade_date.loc[\"2005/01/04\"][0]\n",
    "start"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd.date_range()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "[1,2] == [1,2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "current_date = datetime.today().date().strftime(\"%Y-%m-%d\")\n",
    "au_price = get_price('AU9999.XSGE',start_date=\"2019-03-08 09:00:00\", end_date=\"2019-03-10 15:00:00\", frequency='1m', fields=None)\n",
    "au_price"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "au_price.to_csv(\"c:\\\\quanttime\\\\data\\\\gold\\\\sh_future\\\\tmp1.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "date1 = get_all_trade_days()\n",
    "date2 = pd.DataFrame(date1)\n",
    "date2.to_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_trade_date_new.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "stock_basic_info_dir = \"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info.csv\"\n",
    "get_from_jq = get_all_securities(types=[\"stock\"],date=None)\n",
    "stock_info_basic = pd.read_csv(\n",
    "            stock_basic_info_dir,\n",
    "            index_col=[\"code\"],\n",
    "            encoding=\"gbk\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>display_name</th>\n",
       "      <th>name</th>\n",
       "      <th>start_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>000001.XSHE</th>\n",
       "      <td>平安银行</td>\n",
       "      <td>PAYH</td>\n",
       "      <td>1991-04-03</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002.XSHE</th>\n",
       "      <td>万科A</td>\n",
       "      <td>WKA</td>\n",
       "      <td>1991-01-29</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000004.XSHE</th>\n",
       "      <td>国农科技</td>\n",
       "      <td>GNKJ</td>\n",
       "      <td>1990-12-01</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000005.XSHE</th>\n",
       "      <td>世纪星源</td>\n",
       "      <td>SJXY</td>\n",
       "      <td>1990-12-10</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000006.XSHE</th>\n",
       "      <td>深振业A</td>\n",
       "      <td>SZYA</td>\n",
       "      <td>1992-04-27</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            display_name  name start_date   end_date   type\n",
       "code                                                       \n",
       "000001.XSHE         平安银行  PAYH 1991-04-03 2200-01-01  stock\n",
       "000002.XSHE          万科A   WKA 1991-01-29 2200-01-01  stock\n",
       "000004.XSHE         国农科技  GNKJ 1990-12-01 2200-01-01  stock\n",
       "000005.XSHE         世纪星源  SJXY 1990-12-10 2200-01-01  stock\n",
       "000006.XSHE         深振业A  SZYA 1992-04-27 2200-01-01  stock"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "get_from_jq.index.name = \"code\"\n",
    "get_from_jq.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "get_from_jq.to_csv(\"C:\\\\quanttime\\\\data\\\\basic_info\\\\all_stock_info111111.csv\",encoding=\"gbk\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pymongo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n"
     ]
    }
   ],
   "source": [
    "mongo_client = pymongo.MongoClient('mongodb://localhost:27017/')\n",
    "basic_info_db = mongo_client[\"basic_info_db\"]\n",
    "all_stock_info = basic_info_db[\"all_stock_info\"]\n",
    "ret = all_stock_info.drop()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tushare as ts\n",
    "token = \"17e7755e254f02cc312b8b7e22ded9a308924147f8546fdfbe653ba1\"\n",
    "ts.set_token(token)\n",
    "# ts 授权\n",
    "pro = ts.pro_api()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ts_code</th>\n",
       "      <th>name</th>\n",
       "      <th>market</th>\n",
       "      <th>publisher</th>\n",
       "      <th>category</th>\n",
       "      <th>base_date</th>\n",
       "      <th>base_point</th>\n",
       "      <th>list_date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>000171.CSI</td>\n",
       "      <td>新兴成指</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20101231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20170125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>000801.CSI</td>\n",
       "      <td>资源80</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20111108</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>000803.CSI</td>\n",
       "      <td>300波动</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>000804.CSI</td>\n",
       "      <td>500波动</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>000809.CSI</td>\n",
       "      <td>细分农业</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>000810.CSI</td>\n",
       "      <td>细分能源</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>000811.CSI</td>\n",
       "      <td>细分有色</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>000812.CSI</td>\n",
       "      <td>细分机械</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>000813.CSI</td>\n",
       "      <td>细分化工</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>000815.CSI</td>\n",
       "      <td>细分食品</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>000818.CSI</td>\n",
       "      <td>细分金融</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120411</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>000822.CSI</td>\n",
       "      <td>中证500红利</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>000824.CSI</td>\n",
       "      <td>中证国企红利</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20090630</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>000825.CSI</td>\n",
       "      <td>中证央企红利</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20081231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>000826.CSI</td>\n",
       "      <td>中证民企红利</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20090630</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>000829.CSI</td>\n",
       "      <td>沪深300低贝塔</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>000830.CSI</td>\n",
       "      <td>中证500高贝塔</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>000831.CSI</td>\n",
       "      <td>中证500低贝塔</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120806</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>000838.CSI</td>\n",
       "      <td>中证创业价值</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20091231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120926</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>000839.CSI</td>\n",
       "      <td>中证浙企综指</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20121109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>000840.CSI</td>\n",
       "      <td>中证浙江民企</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20121109</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>000843.CSI</td>\n",
       "      <td>沪深300动态</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20130107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>000844.CSI</td>\n",
       "      <td>沪深300稳定</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>策略指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20130107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>000845.CSI</td>\n",
       "      <td>中证中期信用债</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20120918</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>000860.CSI</td>\n",
       "      <td>结构调整</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20141231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20180326</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>000891.CSI</td>\n",
       "      <td>新兴综指</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20101231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20170125</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>000902.CSI</td>\n",
       "      <td>中证流通</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>规模指数</td>\n",
       "      <td>20051230</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20060227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>000907.CSI</td>\n",
       "      <td>中证700</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>规模指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20070115</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>000915.CSI</td>\n",
       "      <td>沪深300信息</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>一级行业指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20070702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>000916.CSI</td>\n",
       "      <td>沪深300电信</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>一级行业指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20070702</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023</th>\n",
       "      <td>n30828.CSI</td>\n",
       "      <td>中票0-1(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20101231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2024</th>\n",
       "      <td>n30829.CSI</td>\n",
       "      <td>中票1-3(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20081231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2025</th>\n",
       "      <td>n30830.CSI</td>\n",
       "      <td>中票3-5(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20081231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2026</th>\n",
       "      <td>n30831.CSI</td>\n",
       "      <td>中票5-7(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20101231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2027</th>\n",
       "      <td>n30832.CSI</td>\n",
       "      <td>中票7+(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20101231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2028</th>\n",
       "      <td>n30833.CSI</td>\n",
       "      <td>中票城投(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20091231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2029</th>\n",
       "      <td>n30834.CSI</td>\n",
       "      <td>中票非城投(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20081231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2030</th>\n",
       "      <td>n30849.CSI</td>\n",
       "      <td>10年国开债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2031</th>\n",
       "      <td>n30865.CSI</td>\n",
       "      <td>5年地债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20130630</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2032</th>\n",
       "      <td>n30866.CSI</td>\n",
       "      <td>10年地债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20131231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160719</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2033</th>\n",
       "      <td>n30870.CSI</td>\n",
       "      <td>政金债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2034</th>\n",
       "      <td>n30871.CSI</td>\n",
       "      <td>政金债1-3(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2035</th>\n",
       "      <td>n30872.CSI</td>\n",
       "      <td>政金债3-5(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2036</th>\n",
       "      <td>n30873.CSI</td>\n",
       "      <td>政金债5-8(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2037</th>\n",
       "      <td>n30874.CSI</td>\n",
       "      <td>政金债8-10(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20160809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2038</th>\n",
       "      <td>n30909.CSI</td>\n",
       "      <td>中证地产债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20161107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2039</th>\n",
       "      <td>n30916.CSI</td>\n",
       "      <td>中证10年国债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20081231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20161205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2040</th>\n",
       "      <td>n30951.CSI</td>\n",
       "      <td>交易所绿色债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20161230</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20170619</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2041</th>\n",
       "      <td>n30954.CSI</td>\n",
       "      <td>5年久期国开债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20170522</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2042</th>\n",
       "      <td>n30996.CSI</td>\n",
       "      <td>5年久期政金债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20170720</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2043</th>\n",
       "      <td>n31010.CSI</td>\n",
       "      <td>1-3年国开债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20071231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20170828</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2044</th>\n",
       "      <td>n31016.CSI</td>\n",
       "      <td>中证平安5年国债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20111231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20171025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2045</th>\n",
       "      <td>n31017.CSI</td>\n",
       "      <td>中证平安10年国债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20111231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20171025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2046</th>\n",
       "      <td>n31018.CSI</td>\n",
       "      <td>中证平安5-10年国债(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20111231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20171025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2047</th>\n",
       "      <td>n31059.CSI</td>\n",
       "      <td>同业存单AAA(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20141231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20180111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2048</th>\n",
       "      <td>n31060.CSI</td>\n",
       "      <td>高等级同业存单(利)</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>债券指数</td>\n",
       "      <td>20141231</td>\n",
       "      <td>100.0</td>\n",
       "      <td>20180111</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2049</th>\n",
       "      <td>N99001.CSI</td>\n",
       "      <td>三板成指全收益</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>规模指数</td>\n",
       "      <td>20141231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20150318</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2050</th>\n",
       "      <td>N99002.CSI</td>\n",
       "      <td>三板做市全收益</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>规模指数</td>\n",
       "      <td>20141231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20150318</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2051</th>\n",
       "      <td>s00972.CSI</td>\n",
       "      <td>300深市全收益</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20041231</td>\n",
       "      <td>1000.0</td>\n",
       "      <td>20120621</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2052</th>\n",
       "      <td>SHHKSI.CSI</td>\n",
       "      <td>沪港通AH股精明</td>\n",
       "      <td>CSI</td>\n",
       "      <td>中证公司</td>\n",
       "      <td>主题指数</td>\n",
       "      <td>20140409</td>\n",
       "      <td>5000.0</td>\n",
       "      <td>20141117</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2053 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         ts_code            name market publisher category base_date  \\\n",
       "0     000171.CSI            新兴成指    CSI      中证公司     主题指数  20101231   \n",
       "1     000801.CSI            资源80    CSI      中证公司     主题指数  20041231   \n",
       "2     000803.CSI           300波动    CSI      中证公司     策略指数  20041231   \n",
       "3     000804.CSI           500波动    CSI      中证公司     策略指数  20041231   \n",
       "4     000809.CSI            细分农业    CSI      中证公司     主题指数  20041231   \n",
       "5     000810.CSI            细分能源    CSI      中证公司     主题指数  20041231   \n",
       "6     000811.CSI            细分有色    CSI      中证公司     主题指数  20041231   \n",
       "7     000812.CSI            细分机械    CSI      中证公司     主题指数  20041231   \n",
       "8     000813.CSI            细分化工    CSI      中证公司     主题指数  20041231   \n",
       "9     000815.CSI            细分食品    CSI      中证公司     主题指数  20041231   \n",
       "10    000818.CSI            细分金融    CSI      中证公司     主题指数  20041231   \n",
       "11    000822.CSI         中证500红利    CSI      中证公司     主题指数  20041231   \n",
       "12    000824.CSI          中证国企红利    CSI      中证公司     主题指数  20090630   \n",
       "13    000825.CSI          中证央企红利    CSI      中证公司     主题指数  20081231   \n",
       "14    000826.CSI          中证民企红利    CSI      中证公司     主题指数  20090630   \n",
       "15    000829.CSI        沪深300低贝塔    CSI      中证公司     策略指数  20041231   \n",
       "16    000830.CSI        中证500高贝塔    CSI      中证公司     策略指数  20041231   \n",
       "17    000831.CSI        中证500低贝塔    CSI      中证公司     策略指数  20041231   \n",
       "18    000838.CSI          中证创业价值    CSI      中证公司     主题指数  20091231   \n",
       "19    000839.CSI          中证浙企综指    CSI      中证公司     主题指数  20041231   \n",
       "20    000840.CSI          中证浙江民企    CSI      中证公司     主题指数  20041231   \n",
       "21    000843.CSI         沪深300动态    CSI      中证公司     策略指数  20041231   \n",
       "22    000844.CSI         沪深300稳定    CSI      中证公司     策略指数  20041231   \n",
       "23    000845.CSI         中证中期信用债    CSI      中证公司     债券指数  20071231   \n",
       "24    000860.CSI            结构调整    CSI      中证公司     主题指数  20141231   \n",
       "25    000891.CSI            新兴综指    CSI      中证公司     主题指数  20101231   \n",
       "26    000902.CSI            中证流通    CSI      中证公司     规模指数  20051230   \n",
       "27    000907.CSI           中证700    CSI      中证公司     规模指数  20041231   \n",
       "28    000915.CSI         沪深300信息    CSI      中证公司   一级行业指数  20041231   \n",
       "29    000916.CSI         沪深300电信    CSI      中证公司   一级行业指数  20041231   \n",
       "...          ...             ...    ...       ...      ...       ...   \n",
       "2023  n30828.CSI        中票0-1(利)    CSI      中证公司     债券指数  20101231   \n",
       "2024  n30829.CSI        中票1-3(利)    CSI      中证公司     债券指数  20081231   \n",
       "2025  n30830.CSI        中票3-5(利)    CSI      中证公司     债券指数  20081231   \n",
       "2026  n30831.CSI        中票5-7(利)    CSI      中证公司     债券指数  20101231   \n",
       "2027  n30832.CSI         中票7+(利)    CSI      中证公司     债券指数  20101231   \n",
       "2028  n30833.CSI         中票城投(利)    CSI      中证公司     债券指数  20091231   \n",
       "2029  n30834.CSI        中票非城投(利)    CSI      中证公司     债券指数  20081231   \n",
       "2030  n30849.CSI       10年国开债(利)    CSI      中证公司     债券指数  20071231   \n",
       "2031  n30865.CSI         5年地债(利)    CSI      中证公司     债券指数  20130630   \n",
       "2032  n30866.CSI        10年地债(利)    CSI      中证公司     债券指数  20131231   \n",
       "2033  n30870.CSI          政金债(利)    CSI      中证公司     债券指数  20071231   \n",
       "2034  n30871.CSI       政金债1-3(利)    CSI      中证公司     债券指数  20071231   \n",
       "2035  n30872.CSI       政金债3-5(利)    CSI      中证公司     债券指数  20071231   \n",
       "2036  n30873.CSI       政金债5-8(利)    CSI      中证公司     债券指数  20071231   \n",
       "2037  n30874.CSI      政金债8-10(利)    CSI      中证公司     债券指数  20071231   \n",
       "2038  n30909.CSI        中证地产债(利)    CSI      中证公司     债券指数  20071231   \n",
       "2039  n30916.CSI      中证10年国债(利)    CSI      中证公司     债券指数  20081231   \n",
       "2040  n30951.CSI       交易所绿色债(利)    CSI      中证公司     债券指数  20161230   \n",
       "2041  n30954.CSI      5年久期国开债(利)    CSI      中证公司     债券指数  20071231   \n",
       "2042  n30996.CSI      5年久期政金债(利)    CSI      中证公司     债券指数  20071231   \n",
       "2043  n31010.CSI      1-3年国开债(利)    CSI      中证公司     债券指数  20071231   \n",
       "2044  n31016.CSI     中证平安5年国债(利)    CSI      中证公司     债券指数  20111231   \n",
       "2045  n31017.CSI    中证平安10年国债(利)    CSI      中证公司     债券指数  20111231   \n",
       "2046  n31018.CSI  中证平安5-10年国债(利)    CSI      中证公司     债券指数  20111231   \n",
       "2047  n31059.CSI      同业存单AAA(利)    CSI      中证公司     债券指数  20141231   \n",
       "2048  n31060.CSI      高等级同业存单(利)    CSI      中证公司     债券指数  20141231   \n",
       "2049  N99001.CSI         三板成指全收益    CSI      中证公司     规模指数  20141231   \n",
       "2050  N99002.CSI         三板做市全收益    CSI      中证公司     规模指数  20141231   \n",
       "2051  s00972.CSI        300深市全收益    CSI      中证公司     主题指数  20041231   \n",
       "2052  SHHKSI.CSI        沪港通AH股精明    CSI      中证公司     主题指数  20140409   \n",
       "\n",
       "      base_point list_date  \n",
       "0         1000.0  20170125  \n",
       "1         1000.0  20111108  \n",
       "2         1000.0  20120109  \n",
       "3         1000.0  20120109  \n",
       "4         1000.0  20120411  \n",
       "5         1000.0  20120411  \n",
       "6         1000.0  20120411  \n",
       "7         1000.0  20120411  \n",
       "8         1000.0  20120411  \n",
       "9         1000.0  20120411  \n",
       "10        1000.0  20120411  \n",
       "11        1000.0  20120720  \n",
       "12        1000.0  20120720  \n",
       "13        1000.0  20120720  \n",
       "14        1000.0  20120720  \n",
       "15        1000.0  20120806  \n",
       "16        1000.0  20120806  \n",
       "17        1000.0  20120806  \n",
       "18        1000.0  20120926  \n",
       "19        1000.0  20121109  \n",
       "20        1000.0  20121109  \n",
       "21        1000.0  20130107  \n",
       "22        1000.0  20130107  \n",
       "23         100.0  20120918  \n",
       "24        1000.0  20180326  \n",
       "25        1000.0  20170125  \n",
       "26        1000.0  20060227  \n",
       "27        1000.0  20070115  \n",
       "28        1000.0  20070702  \n",
       "29        1000.0  20070702  \n",
       "...          ...       ...  \n",
       "2023       100.0  20160525  \n",
       "2024       100.0  20160525  \n",
       "2025       100.0  20160525  \n",
       "2026       100.0  20160525  \n",
       "2027       100.0  20160525  \n",
       "2028       100.0  20160525  \n",
       "2029       100.0  20160525  \n",
       "2030       100.0  20160630  \n",
       "2031       100.0  20160719  \n",
       "2032       100.0  20160719  \n",
       "2033       100.0  20160809  \n",
       "2034       100.0  20160809  \n",
       "2035       100.0  20160809  \n",
       "2036       100.0  20160809  \n",
       "2037       100.0  20160809  \n",
       "2038       100.0  20161107  \n",
       "2039       100.0  20161205  \n",
       "2040       100.0  20170619  \n",
       "2041       100.0  20170522  \n",
       "2042       100.0  20170720  \n",
       "2043       100.0  20170828  \n",
       "2044       100.0  20171025  \n",
       "2045       100.0  20171025  \n",
       "2046       100.0  20171025  \n",
       "2047       100.0  20180111  \n",
       "2048       100.0  20180111  \n",
       "2049      1000.0  20150318  \n",
       "2050      1000.0  20150318  \n",
       "2051      1000.0  20120621  \n",
       "2052      5000.0  20141117  \n",
       "\n",
       "[2053 rows x 8 columns]"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmp = pro.index_basic(market=\"CSI\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'h20702.CSI',\n",
       " '930755.CSI',\n",
       " 'h30377.CSI',\n",
       " 'h20386.CSI',\n",
       " '930746.CSI',\n",
       " '930920.CSI',\n",
       " 'h01073.CSI',\n",
       " 'h30354.CSI',\n",
       " 'h30408.CSI',\n",
       " 'h30461.CSI',\n",
       " '930872.CSI',\n",
       " 'h11158.CSI',\n",
       " 'h20960.CSI',\n",
       " 'h30095.CSI',\n",
       " 'h20856.CSI',\n",
       " 'h20829.CSI',\n",
       " '930834.CSI',\n",
       " 'h30003.CSI',\n",
       " 'h30086.CSI',\n",
       " 'h00922.CSI',\n",
       " 'h01001.CSI',\n",
       " '931058.CSI',\n",
       " 'h00815.CSI',\n",
       " 'h30385.CSI',\n",
       " '930742.CSI',\n",
       " 'h00827.CSI',\n",
       " 'h11024.CSI',\n",
       " 'h20185.CSI',\n",
       " 'h01087.CSI',\n",
       " 'n11002.CSI',\n",
       " 'h30073.CSI',\n",
       " 'n30831.CSI',\n",
       " 'h21085.CSI',\n",
       " 'h20730.CSI',\n",
       " 'n00905.CSI',\n",
       " 'h20931.CSI',\n",
       " 'h30205.CSI',\n",
       " 'h20391.CSI',\n",
       " '930958.CSI',\n",
       " 'h20958.CSI',\n",
       " 'h11059.CSI',\n",
       " 'h30429.CSI',\n",
       " '930870.CSI',\n",
       " 'h20667.CSI',\n",
       " 'h20784.CSI',\n",
       " 'h20962.CSI',\n",
       " '930790.CSI',\n",
       " 'h30412.CSI',\n",
       " 'h01130.CSI',\n",
       " 'h00941.CSI',\n",
       " 'h11054.CSI',\n",
       " 'h30077.CSI',\n",
       " '930876.CSI',\n",
       " 'h01124.CSI',\n",
       " 'h20429.CSI',\n",
       " 'h20828.CSI',\n",
       " '931106.CSI',\n",
       " '930885.CSI',\n",
       " 'h30007.CSI',\n",
       " 'h11123.CSI',\n",
       " 'h20934.CSI',\n",
       " '930811.CSI',\n",
       " 'CESCPE.CSI',\n",
       " '000809.CSI',\n",
       " 'h20701.CSI',\n",
       " '931024.CSI',\n",
       " 'h20708.CSI',\n",
       " 'n11016.CSI',\n",
       " '930879.CSI',\n",
       " 'h30362.CSI',\n",
       " '930736.CSI',\n",
       " 'h01052.CSI',\n",
       " '930805.CSI',\n",
       " '930844.CSI',\n",
       " '930856.CSI',\n",
       " 's00972.CSI',\n",
       " 'h30550.CSI',\n",
       " '000843.CSI',\n",
       " '930837.CSI',\n",
       " 'h20137.CSI',\n",
       " 'h01157.CSI',\n",
       " 'h00969.CSI',\n",
       " 'h11049.CSI',\n",
       " 'h50067.CSI',\n",
       " 'n11011.CSI',\n",
       " 'h01010.CSI',\n",
       " 'h20874.CSI',\n",
       " 'h20908.CSI',\n",
       " 'h20260.CSI',\n",
       " '000891.CSI',\n",
       " 'h30183.CSI',\n",
       " '930853.CSI',\n",
       " '930629.CSI',\n",
       " 'h20194.CSI',\n",
       " '930891.CSI',\n",
       " 'h11124.CSI',\n",
       " '930744.CSI',\n",
       " 'h20389.CSI',\n",
       " 'h20414.CSI',\n",
       " 'h01160.CSI',\n",
       " 'n31060.CSI',\n",
       " '930917.CSI',\n",
       " 'h20563.CSI',\n",
       " 'h00838.CSI',\n",
       " 'h20553.CSI',\n",
       " 'h30002.CSI',\n",
       " 'h20883.CSI',\n",
       " 'h30098.CSI',\n",
       " 'h00801.CSI',\n",
       " 'h00950.CSI',\n",
       " 'h20681.CSI',\n",
       " '930774.CSI',\n",
       " '931063.CSI',\n",
       " '930771.CSI',\n",
       " 'h20905.CSI',\n",
       " 'h21086.CSI',\n",
       " 'h20863.CSI',\n",
       " 'h30454.CSI',\n",
       " 'h01126.CSI',\n",
       " 'h30207.CSI',\n",
       " 'h20746.CSI',\n",
       " '000949.CSI',\n",
       " 'h20532.CSI',\n",
       " '950080.CSI',\n",
       " '930673.CSI',\n",
       " 'h21018.CSI',\n",
       " 'n11075.CSI',\n",
       " '930763.CSI',\n",
       " 'h20978.CSI',\n",
       " 'h20028.CSI',\n",
       " 'h21111.CSI',\n",
       " 'h30061.CSI',\n",
       " 'h20384.CSI',\n",
       " 'h30527.CSI',\n",
       " 'h30058.CSI',\n",
       " '930798.CSI',\n",
       " '000948.CSI',\n",
       " 'h40069.CSI',\n",
       " 'h00905.CSI',\n",
       " '930889.CSI',\n",
       " '931117.CSI',\n",
       " '930916.CSI',\n",
       " '133333.CSI',\n",
       " '931053.CSI',\n",
       " '930977.CSI',\n",
       " '000921.CSI',\n",
       " 'h20531.CSI',\n",
       " 'h11026.CSI',\n",
       " '930645.CSI',\n",
       " 'h50049.CSI',\n",
       " 'h01102.CSI',\n",
       " '930873.CSI',\n",
       " 'h30079.CSI',\n",
       " 'h01137.CSI',\n",
       " 'h30391.CSI',\n",
       " 'n11072.CSI',\n",
       " 'n00903.CSI',\n",
       " 'h20258.CSI',\n",
       " '930766.CSI',\n",
       " 'h20809.CSI',\n",
       " 'h11180.CSI',\n",
       " 'h20383.CSI',\n",
       " 'n11089.CSI',\n",
       " 'h30173.CSI',\n",
       " 'h20813.CSI',\n",
       " '950072.CSI',\n",
       " 'h30482.CSI',\n",
       " 'h20423.CSI',\n",
       " '930941.CSI',\n",
       " 'h20986.CSI',\n",
       " 'h20108.CSI',\n",
       " 'h20544.CSI',\n",
       " '930993.CSI',\n",
       " '931037.CSI',\n",
       " 'h30267.CSI',\n",
       " 'h30042.CSI',\n",
       " 'h20206.CSI',\n",
       " 'h20954.CSI',\n",
       " 'h11051.CSI',\n",
       " 'h21098.CSI',\n",
       " '000988.CSI',\n",
       " '930698.CSI',\n",
       " '931042.CSI',\n",
       " '931027.CSI',\n",
       " 'h50055.CSI',\n",
       " 'h20669.CSI',\n",
       " '000811.CSI',\n",
       " 'h11138.CSI',\n",
       " 'h20980.CSI',\n",
       " '930635.CSI',\n",
       " '950077.CSI',\n",
       " 'h20799.CSI',\n",
       " 'h20424.CSI',\n",
       " '930634.CSI',\n",
       " 'h30560.CSI',\n",
       " 'h20825.CSI',\n",
       " '930787.CSI',\n",
       " 'h30062.CSI',\n",
       " 'n30834.CSI',\n",
       " 'h30030.CSI',\n",
       " '000962.CSI',\n",
       " 'h20565.CSI',\n",
       " 'h01091.CSI',\n",
       " 'h20824.CSI',\n",
       " '931057.CSI',\n",
       " 'h11135.CSI',\n",
       " 'h30072.CSI',\n",
       " 'h20068.CSI',\n",
       " 'h30352.CSI',\n",
       " '931050.CSI',\n",
       " 'h11130.CSI',\n",
       " 'h20998.CSI',\n",
       " 'h20081.CSI',\n",
       " 'h20837.CSI',\n",
       " 'h20876.CSI',\n",
       " 'h20138.CSI',\n",
       " 'h21092.CSI',\n",
       " 'h20597.CSI',\n",
       " 'h20743.CSI',\n",
       " 'h21048.CSI',\n",
       " 'h30252.CSI',\n",
       " 'h20885.CSI',\n",
       " 'h20369.CSI',\n",
       " 'h30011.CSI',\n",
       " 'h30081.CSI',\n",
       " 'h30355.CSI',\n",
       " 'h00803.CSI',\n",
       " 'h30588.CSI',\n",
       " 'h00825.CSI',\n",
       " 'h20852.CSI',\n",
       " '930865.CSI',\n",
       " 'h20433.CSI',\n",
       " 'h30130.CSI',\n",
       " 'h11136.CSI',\n",
       " 'h11076.CSI',\n",
       " 'h00944.CSI',\n",
       " 'h11066.CSI',\n",
       " 'h20133.CSI',\n",
       " 'h00923.CSI',\n",
       " '000985.CSI',\n",
       " 'h30563.CSI',\n",
       " '930810.CSI',\n",
       " '930757.CSI',\n",
       " '000955.CSI',\n",
       " 'h11045.CSI',\n",
       " 'h20918.CSI',\n",
       " 'h30440.CSI',\n",
       " '930919.CSI',\n",
       " '930791.CSI',\n",
       " 'h20706.CSI',\n",
       " '931055.CSI',\n",
       " '930909.CSI',\n",
       " '000946.CSI',\n",
       " 'h20854.CSI',\n",
       " 'n31010.CSI',\n",
       " 'h20670.CSI',\n",
       " 'h20620.CSI',\n",
       " '930652.CSI',\n",
       " '931025.CSI',\n",
       " 'h01016.CSI',\n",
       " '930833.CSI',\n",
       " 'h01056.CSI',\n",
       " 'h11040.CSI',\n",
       " 'h20909.CSI',\n",
       " '930649.CSI',\n",
       " 'h30099.CSI',\n",
       " 'n31017.CSI',\n",
       " 'h20634.CSI',\n",
       " 'h20916.CSI',\n",
       " 'h21114.CSI',\n",
       " '930893.CSI',\n",
       " '931036.CSI',\n",
       " 'h11104.CSI',\n",
       " 'h20797.CSI',\n",
       " '930785.CSI',\n",
       " '930998.CSI',\n",
       " '931111.CSI',\n",
       " 'h11022.CSI',\n",
       " '930982.CSI',\n",
       " 'h30251.CSI',\n",
       " 'h50047.CSI',\n",
       " 'h20859.CSI',\n",
       " '930662.CSI',\n",
       " '930875.CSI',\n",
       " '931097.CSI',\n",
       " 'h11037.CSI',\n",
       " '000860.CSI',\n",
       " 'n11001.CSI',\n",
       " '931086.CSI',\n",
       " 'h00942.CSI',\n",
       " 'h20548.CSI',\n",
       " 'h01060.CSI',\n",
       " 'h30190.CSI',\n",
       " 'h40072.CSI',\n",
       " 'h00985.CSI',\n",
       " 'h20849.CSI',\n",
       " 'N99002.CSI',\n",
       " 'h11007.CSI',\n",
       " '931100.CSI',\n",
       " 'h20379.CSI',\n",
       " 'h01134.CSI',\n",
       " '930884.CSI',\n",
       " 'h20013.CSI',\n",
       " '930707.CSI',\n",
       " 'h30597.CSI',\n",
       " 'n31059.CSI',\n",
       " '930991.CSI',\n",
       " '399986.CSI',\n",
       " 'h20734.CSI',\n",
       " '930747.CSI',\n",
       " 'n30873.CSI',\n",
       " 'h20860.CSI',\n",
       " 'n11008.CSI',\n",
       " 'h30590.CSI',\n",
       " 'h11075.CSI',\n",
       " 'h20129.CSI',\n",
       " '930961.CSI',\n",
       " 'n30832.CSI',\n",
       " 'h20840.CSI',\n",
       " 'h30192.CSI',\n",
       " 'h11160.CSI',\n",
       " 'CES106.CSI',\n",
       " 'h11031.CSI',\n",
       " 'h30045.CSI',\n",
       " '931047.CSI',\n",
       " 'h20030.CSI',\n",
       " 'h01011.CSI',\n",
       " 'n00301.CSI',\n",
       " 'h50065.CSI',\n",
       " 'h11056.CSI',\n",
       " 'h00982.CSI',\n",
       " 'h30036.CSI',\n",
       " 'n11092.CSI',\n",
       " 'h20796.CSI',\n",
       " 'h20416.CSI',\n",
       " 'n11019.CSI',\n",
       " '930704.CSI',\n",
       " 'h20187.CSI',\n",
       " 'h00809.CSI',\n",
       " 'h20095.CSI',\n",
       " 'n00910.CSI',\n",
       " 'h00955.CSI',\n",
       " 'h30052.CSI',\n",
       " 'n11090.CSI',\n",
       " 'h00971.CSI',\n",
       " 'h30322.CSI',\n",
       " 'h30031.CSI',\n",
       " '930678.CSI',\n",
       " 'h30470.CSI',\n",
       " 'h20677.CSI',\n",
       " '930877.CSI',\n",
       " 'h20195.CSI',\n",
       " 'h30370.CSI',\n",
       " 'h30389.CSI',\n",
       " 'h30565.CSI',\n",
       " 'h30027.CSI',\n",
       " 'h21030.CSI',\n",
       " 'h11091.CSI',\n",
       " 'h20955.CSI',\n",
       " 'h00891.CSI',\n",
       " '931098.CSI',\n",
       " 'h30055.CSI',\n",
       " '930641.CSI',\n",
       " '930930.CSI',\n",
       " 'h30428.CSI',\n",
       " 'h11064.CSI',\n",
       " 'h30174.CSI',\n",
       " 'h20093.CSI',\n",
       " '930984.CSI',\n",
       " 'h20426.CSI',\n",
       " 'h20556.CSI',\n",
       " 'h30143.CSI',\n",
       " '931110.CSI',\n",
       " 'h30365.CSI',\n",
       " 'h30191.CSI',\n",
       " 'h30268.CSI',\n",
       " 'CES002.CSI',\n",
       " 'h00908.CSI',\n",
       " 'h20387.CSI',\n",
       " '930965.CSI',\n",
       " '930933.CSI',\n",
       " 'h30093.CSI',\n",
       " 'h11092.CSI',\n",
       " 'h30214.CSI',\n",
       " 'n11087.CSI',\n",
       " 'h30480.CSI',\n",
       " 'h30024.CSI',\n",
       " 'h21095.CSI',\n",
       " 'h20205.CSI',\n",
       " 'h30562.CSI',\n",
       " 'h21116.CSI',\n",
       " 'h20963.CSI',\n",
       " 'h30131.CSI',\n",
       " 'h11131.CSI',\n",
       " '930644.CSI',\n",
       " '930831.CSI',\n",
       " 'h30380.CSI',\n",
       " 'h30008.CSI',\n",
       " 'h20253.CSI',\n",
       " 'h01118.CSI',\n",
       " 'h30089.CSI',\n",
       " 'h50068.CSI',\n",
       " 'h40070.CSI',\n",
       " 'h20255.CSI',\n",
       " '930883.CSI',\n",
       " 'h11071.CSI',\n",
       " 'h30009.CSI',\n",
       " 'h20252.CSI',\n",
       " '930836.CSI',\n",
       " 'n11078.CSI',\n",
       " 'h20596.CSI',\n",
       " 'h11116.CSI',\n",
       " 'h20366.CSI',\n",
       " 'h01112.CSI',\n",
       " 'h00802.CSI',\n",
       " 'h20971.CSI',\n",
       " 'h30455.CSI',\n",
       " '930892.CSI',\n",
       " 'h00953.CSI',\n",
       " 'h30226.CSI',\n",
       " '930648.CSI',\n",
       " '930711.CSI',\n",
       " '930682.CSI',\n",
       " 'h00957.CSI',\n",
       " 'h20011.CSI',\n",
       " 'h20606.CSI',\n",
       " 'h00986.CSI',\n",
       " '930948.CSI',\n",
       " 'h20861.CSI',\n",
       " 'h20900.CSI',\n",
       " 'h30456.CSI',\n",
       " '930959.CSI',\n",
       " '000980.CSI',\n",
       " 'h20073.CSI',\n",
       " 'h20970.CSI',\n",
       " 'h30127.CSI',\n",
       " '930732.CSI',\n",
       " 'h50048.CSI',\n",
       " 'h21021.CSI',\n",
       " '930929.CSI',\n",
       " 'h21011.CSI',\n",
       " 'h30479.CSI',\n",
       " '000810.CSI',\n",
       " 'h20430.CSI',\n",
       " 'h30259.CSI',\n",
       " 'n30849.CSI',\n",
       " '930752.CSI',\n",
       " 'h01002.CSI',\n",
       " 'h01114.CSI',\n",
       " 'h20833.CSI',\n",
       " 'h00935.CSI',\n",
       " 'h50044.CSI',\n",
       " 'h20179.CSI',\n",
       " 'h11016.CSI',\n",
       " '930677.CSI',\n",
       " 'h20204.CSI',\n",
       " 'h20712.CSI',\n",
       " '704843.CSI',\n",
       " 'h30010.CSI',\n",
       " 'h20026.CSI',\n",
       " 'h30532.CSI',\n",
       " '930751.CSI',\n",
       " 'h20727.CSI',\n",
       " '930633.CSI',\n",
       " 'h30256.CSI',\n",
       " 'h21032.CSI',\n",
       " '930686.CSI',\n",
       " 'h00171.CSI',\n",
       " 'h30460.CSI',\n",
       " '930661.CSI',\n",
       " 'h20646.CSI',\n",
       " 'n11071.CSI',\n",
       " 'h30530.CSI',\n",
       " 'h30444.CSI',\n",
       " 'h20930.CSI',\n",
       " 'h20618.CSI',\n",
       " '930610.CSI',\n",
       " 'h00839.CSI',\n",
       " 'n00845.CSI',\n",
       " '930669.CSI',\n",
       " 'n11096.CSI',\n",
       " 'h30199.CSI',\n",
       " 'h20181.CSI',\n",
       " 'h30261.CSI',\n",
       " 'h11058.CSI',\n",
       " 'h30041.CSI',\n",
       " 'n11003.CSI',\n",
       " 'h30201.CSI',\n",
       " 'h20956.CSI',\n",
       " 'h30423.CSI',\n",
       " 'h30312.CSI',\n",
       " 'h30546.CSI',\n",
       " 'h30472.CSI',\n",
       " 'CES105.CSI',\n",
       " 'h30564.CSI',\n",
       " '000968.CSI',\n",
       " 'h20261.CSI',\n",
       " 'h20394.CSI',\n",
       " 'h30032.CSI',\n",
       " 'h30462.CSI',\n",
       " 'n30787.CSI',\n",
       " 'h30185.CSI',\n",
       " 'h11125.CSI',\n",
       " 'h20622.CSI',\n",
       " 'h30425.CSI',\n",
       " 'n00912.CSI',\n",
       " 'h20177.CSI',\n",
       " 'h30459.CSI',\n",
       " 'h20678.CSI',\n",
       " 'n11091.CSI',\n",
       " 'h30351.CSI',\n",
       " 'h00968.CSI',\n",
       " '000844.CSI',\n",
       " 'h20629.CSI',\n",
       " 'h20884.CSI',\n",
       " 'h30255.CSI',\n",
       " 'h01116.CSI',\n",
       " 'n00909.CSI',\n",
       " '930722.CSI',\n",
       " 'h21001.CSI',\n",
       " 'h01008.CSI',\n",
       " '000994.CSI',\n",
       " 'h20092.CSI',\n",
       " 'h00993.CSI',\n",
       " 'CES008.CSI',\n",
       " '930748.CSI',\n",
       " 'h30556.CSI',\n",
       " 'h30082.CSI',\n",
       " 'h01017.CSI',\n",
       " 'h20933.CSI',\n",
       " 'h20164.CSI',\n",
       " 'h21045.CSI',\n",
       " 'h01074.CSI',\n",
       " '930957.CSI',\n",
       " 'h20555.CSI',\n",
       " 'h01172.CSI',\n",
       " 'n11014.CSI',\n",
       " '931045.CSI',\n",
       " '931029.CSI',\n",
       " 'h01135.CSI',\n",
       " '930651.CSI',\n",
       " 'h00860.CSI',\n",
       " 'h11134.CSI',\n",
       " '930814.CSI',\n",
       " '930622.CSI',\n",
       " 'h20645.CSI',\n",
       " 'h20982.CSI',\n",
       " '931059.CSI',\n",
       " '930980.CSI',\n",
       " 'h21047.CSI',\n",
       " 'h20652.CSI',\n",
       " 'h50062.CSI',\n",
       " '930714.CSI',\n",
       " 'h21112.CSI',\n",
       " '931108.CSI',\n",
       " '930978.CSI',\n",
       " 'h20020.CSI',\n",
       " '950078.CSI',\n",
       " 'h20088.CSI',\n",
       " 'h20212.CSI',\n",
       " '930900.CSI',\n",
       " 'h01181.CSI',\n",
       " 'h20850.CSI',\n",
       " '930731.CSI',\n",
       " 'h20223.CSI',\n",
       " 'h30551.CSI',\n",
       " 'h21099.CSI',\n",
       " 'h11068.CSI',\n",
       " 'h00939.CSI',\n",
       " 'h20131.CSI',\n",
       " 'h30548.CSI',\n",
       " 'h20018.CSI',\n",
       " 'h20711.CSI',\n",
       " 'h30315.CSI',\n",
       " '950075.CSI',\n",
       " 'h20268.CSI',\n",
       " 'h30215.CSI',\n",
       " 'h00977.CSI',\n",
       " '930676.CSI',\n",
       " 'h20785.CSI',\n",
       " '931015.CSI',\n",
       " 'h20704.CSI',\n",
       " 'h20257.CSI',\n",
       " '931054.CSI',\n",
       " 'h11041.CSI',\n",
       " 'h11115.CSI',\n",
       " 'h30175.CSI',\n",
       " 'h30034.CSI',\n",
       " '931007.CSI',\n",
       " 'h30426.CSI',\n",
       " 'h20866.CSI',\n",
       " 'h20192.CSI',\n",
       " 'h11053.CSI',\n",
       " 'h20370.CSI',\n",
       " 'h20130.CSI',\n",
       " 'h30554.CSI',\n",
       " 'h01092.CSI',\n",
       " '000927.CSI',\n",
       " 'h20417.CSI',\n",
       " 'h21115.CSI',\n",
       " 'h21012.CSI',\n",
       " '000981.CSI',\n",
       " '930812.CSI',\n",
       " 'h20721.CSI',\n",
       " 'h20777.CSI',\n",
       " 'h30274.CSI',\n",
       " '000926.CSI',\n",
       " 'h30046.CSI',\n",
       " 'h21027.CSI',\n",
       " '930784.CSI',\n",
       " '930878.CSI',\n",
       " 'n00906.CSI',\n",
       " '930802.CSI',\n",
       " 'h00947.CSI',\n",
       " 'h00964.CSI',\n",
       " 'h30049.CSI',\n",
       " 'h20932.CSI',\n",
       " 'h30016.CSI',\n",
       " 'h20914.CSI',\n",
       " 'h20601.CSI',\n",
       " 'h01154.CSI',\n",
       " '930921.CSI',\n",
       " 'h11008.CSI',\n",
       " '930895.CSI',\n",
       " 'h20127.CSI',\n",
       " 'h20200.CSI',\n",
       " 'h20004.CSI',\n",
       " 'h00981.CSI',\n",
       " 'h20668.CSI',\n",
       " 'h00911.CSI',\n",
       " '930786.CSI',\n",
       " 'h20539.CSI',\n",
       " 'h11097.CSI',\n",
       " '950071.CSI',\n",
       " '930756.CSI',\n",
       " 'h20415.CSI',\n",
       " 'h11159.CSI',\n",
       " '930985.CSI',\n",
       " '930996.CSI',\n",
       " 'n11073.CSI',\n",
       " 'h21003.CSI',\n",
       " '930908.CSI',\n",
       " 'h21039.CSI',\n",
       " 'h01159.CSI',\n",
       " 'h00946.CSI',\n",
       " 'h30037.CSI',\n",
       " 'n11079.CSI',\n",
       " '930850.CSI',\n",
       " 'h20381.CSI',\n",
       " 'h20724.CSI',\n",
       " '930823.CSI',\n",
       " 'h20216.CSI',\n",
       " 'h30067.CSI',\n",
       " '000839.CSI',\n",
       " 'h30273.CSI',\n",
       " 'CESG10.CSI',\n",
       " '931005.CSI',\n",
       " '930619.CSI',\n",
       " 'h20368.CSI',\n",
       " 'h40067.CSI',\n",
       " 'h30043.CSI',\n",
       " 'h30374.CSI',\n",
       " 'n11004.CSI',\n",
       " '000831.CSI',\n",
       " 'h30394.CSI',\n",
       " 'h20431.CSI',\n",
       " 'h00805.CSI',\n",
       " 'h11078.CSI',\n",
       " 'h20972.CSI',\n",
       " '930896.CSI',\n",
       " '930946.CSI',\n",
       " 'h30521.CSI',\n",
       " 'h20879.CSI',\n",
       " 'n00950.CSI',\n",
       " '930694.CSI',\n",
       " '000954.CSI',\n",
       " 'h11012.CSI',\n",
       " 'h20945.CSI',\n",
       " 'h20025.CSI',\n",
       " 'h30358.CSI',\n",
       " '930918.CSI',\n",
       " 'h01018.CSI',\n",
       " 'h20376.CSI',\n",
       " 'h01106.CSI',\n",
       " 'h20800.CSI',\n",
       " 'h21101.CSI',\n",
       " '930749.CSI',\n",
       " 'h20692.CSI',\n",
       " 'h30017.CSI',\n",
       " '931109.CSI',\n",
       " 'h00828.CSI',\n",
       " 'h20798.CSI',\n",
       " 'CES003.CSI',\n",
       " 'h20812.CSI',\n",
       " 'h40080.CSI',\n",
       " 'h40068.CSI',\n",
       " 'h20392.CSI',\n",
       " '930620.CSI',\n",
       " 'CES109.CSI',\n",
       " 'h30465.CSI',\n",
       " 'h30018.CSI',\n",
       " 'h11033.CSI',\n",
       " '930880.CSI',\n",
       " 'h20823.CSI',\n",
       " 'h30258.CSI',\n",
       " 'h20182.CSI',\n",
       " '930739.CSI',\n",
       " 'h50056.CSI',\n",
       " '930822.CSI',\n",
       " 'h20621.CSI',\n",
       " 'n30823.CSI',\n",
       " '931092.CSI',\n",
       " 'h20735.CSI',\n",
       " 'h20189.CSI',\n",
       " 'h20903.CSI',\n",
       " 'h11133.CSI',\n",
       " 'h30012.CSI',\n",
       " 'h30083.CSI',\n",
       " 'h30390.CSI',\n",
       " '930612.CSI',\n",
       " 'CES203.CSI',\n",
       " 'h30126.CSI',\n",
       " 'h20872.CSI',\n",
       " 'h00810.CSI',\n",
       " 'h21109.CSI',\n",
       " 'h20551.CSI',\n",
       " 'h21050.CSI',\n",
       " 'h30181.CSI',\n",
       " 'CES001.CSI',\n",
       " '930969.CSI',\n",
       " 'h20822.CSI',\n",
       " 'h20588.CSI',\n",
       " 'h00909.CSI',\n",
       " 'h20002.CSI',\n",
       " 'h11060.CSI',\n",
       " 'h30404.CSI',\n",
       " 'h11044.CSI',\n",
       " 'h50042.CSI',\n",
       " 'h00972.CSI',\n",
       " 'h20134.CSI',\n",
       " 'h11065.CSI',\n",
       " 'n30871.CSI',\n",
       " 'h21096.CSI',\n",
       " 'h30216.CSI',\n",
       " 'n11097.CSI',\n",
       " '930817.CSI',\n",
       " '931107.CSI',\n",
       " 'CES009.CSI',\n",
       " 'h20717.CSI',\n",
       " 'h30020.CSI',\n",
       " 'h30176.CSI',\n",
       " 'h30076.CSI',\n",
       " 'h20191.CSI',\n",
       " '930874.CSI',\n",
       " '930988.CSI',\n",
       " 'h20604.CSI',\n",
       " '930691.CSI',\n",
       " '930683.CSI',\n",
       " '931044.CSI',\n",
       " 'h11088.CSI',\n",
       " 'h30561.CSI',\n",
       " 'n00911.CSI',\n",
       " 'h21006.CSI',\n",
       " 'h21059.CSI',\n",
       " 'h20814.CSI',\n",
       " 'h21028.CSI',\n",
       " 'h20795.CSI',\n",
       " 'h30195.CSI',\n",
       " '930976.CSI',\n",
       " 'h20959.CSI',\n",
       " 'h00998.CSI',\n",
       " 'h30164.CSI',\n",
       " '000938.CSI',\n",
       " '930829.CSI',\n",
       " 'h20659.CSI',\n",
       " 'h30040.CSI',\n",
       " 'h01054.CSI',\n",
       " 'n30865.CSI',\n",
       " '931049.CSI',\n",
       " 'h30084.CSI',\n",
       " 'h20087.CSI',\n",
       " 'n00300.CSI',\n",
       " 'h30222.CSI',\n",
       " '930852.CSI',\n",
       " 'h20003.CSI',\n",
       " 'h20907.CSI',\n",
       " '931001.CSI',\n",
       " 'h20139.CSI',\n",
       " '930696.CSI',\n",
       " 'h11001.CSI',\n",
       " 'h21025.CSI',\n",
       " '930706.CSI',\n",
       " 'h20222.CSI',\n",
       " 'h30039.CSI',\n",
       " '930947.CSI',\n",
       " 'h20171.CSI',\n",
       " 'h20032.CSI',\n",
       " 'h30383.CSI',\n",
       " 'h20559.CSI',\n",
       " 'h00938.CSI',\n",
       " 'h30449.CSI',\n",
       " 'h20781.CSI',\n",
       " 'h01071.CSI',\n",
       " '930922.CSI',\n",
       " '930854.CSI',\n",
       " '931099.CSI',\n",
       " 'h30193.CSI',\n",
       " '931095.CSI',\n",
       " 'h20521.CSI',\n",
       " 'h00818.CSI',\n",
       " 'h01055.CSI',\n",
       " 'h20166.CSI',\n",
       " 'h20816.CSI',\n",
       " 'h20990.CSI',\n",
       " 'h30213.CSI',\n",
       " '930728.CSI',\n",
       " '931067.CSI',\n",
       " 'h20615.CSI',\n",
       " 'h20710.CSI',\n",
       " '930688.CSI',\n",
       " 'h30547.CSI',\n",
       " 'h20250.CSI',\n",
       " 'h30060.CSI',\n",
       " 'h20875.CSI',\n",
       " 'h11050.CSI',\n",
       " 'h20817.CSI',\n",
       " 'h21038.CSI',\n",
       " '930712.CSI',\n",
       " 'h30439.CSI',\n",
       " 'h30409.CSI',\n",
       " '000937.CSI',\n",
       " 'h11011.CSI',\n",
       " 'h20997.CSI',\n",
       " 'h30486.CSI',\n",
       " 'h30549.CSI',\n",
       " 'h20687.CSI',\n",
       " 'h20174.CSI',\n",
       " 'h20830.CSI',\n",
       " '931022.CSI',\n",
       " 'h01072.CSI',\n",
       " 'h30186.CSI',\n",
       " 'h30442.CSI',\n",
       " 'h20632.CSI',\n",
       " '930866.CSI',\n",
       " 'h20186.CSI',\n",
       " 'h30392.CSI',\n",
       " 'h20612.CSI',\n",
       " 'h20802.CSI',\n",
       " '930674.CSI',\n",
       " 'h20393.CSI',\n",
       " 'h30188.CSI',\n",
       " 'h40071.CSI',\n",
       " 'h20690.CSI',\n",
       " 'h20425.CSI',\n",
       " 'h30165.CSI',\n",
       " '931032.CSI',\n",
       " 'h30069.CSI',\n",
       " 'h20660.CSI',\n",
       " 'h11128.CSI',\n",
       " 'h30001.CSI',\n",
       " '930999.CSI',\n",
       " '930898.CSI',\n",
       " '930716.CSI',\n",
       " 'h11118.CSI',\n",
       " 'h01152.CSI',\n",
       " 'h11004.CSI',\n",
       " 'h20815.CSI',\n",
       " 'h20683.CSI',\n",
       " 'h30094.CSI',\n",
       " 'h30015.CSI',\n",
       " 'n30827.CSI',\n",
       " 'h20839.CSI',\n",
       " 'h00913.CSI',\n",
       " 'h20910.CSI',\n",
       " '399975.CSI',\n",
       " '930656.CSI',\n",
       " 'h30047.CSI',\n",
       " '930781.CSI',\n",
       " 'h20810.CSI',\n",
       " 'h30219.CSI',\n",
       " '930700.CSI',\n",
       " '930989.CSI',\n",
       " '930860.CSI',\n",
       " 'h21070.CSI',\n",
       " 'h11072.CSI',\n",
       " 'n11015.CSI',\n",
       " '931046.CSI',\n",
       " '399810.CSI',\n",
       " '930945.CSI',\n",
       " 'h20720.CSI',\n",
       " 'h30413.CSI',\n",
       " 'h30415.CSI',\n",
       " '000829.CSI',\n",
       " '931091.CSI',\n",
       " '930670.CSI',\n",
       " 'h01070.CSI',\n",
       " '399811.CSI',\n",
       " 'h11019.CSI',\n",
       " 'h30006.CSI',\n",
       " 'h20902.CSI',\n",
       " 'h20096.CSI',\n",
       " '930848.CSI',\n",
       " 'h20388.CSI',\n",
       " 'h00300.CSI',\n",
       " 'h20214.CSI',\n",
       " 'h30171.CSI',\n",
       " '930971.CSI',\n",
       " 'h20957.CSI',\n",
       " 'h11014.CSI',\n",
       " 'h20378.CSI',\n",
       " 'h30138.CSI',\n",
       " 'h20654.CSI',\n",
       " 'h30125.CSI',\n",
       " 'h00804.CSI',\n",
       " '930968.CSI',\n",
       " 'h30417.CSI',\n",
       " 'h01155.CSI',\n",
       " '930963.CSI',\n",
       " '930825.CSI',\n",
       " 'h30414.CSI',\n",
       " '931013.CSI',\n",
       " 'h30373.CSI',\n",
       " '931043.CSI',\n",
       " '000845.CSI',\n",
       " 'h20737.CSI',\n",
       " 'h50063.CSI',\n",
       " 'h20649.CSI',\n",
       " 'h20176.CSI',\n",
       " 'CESA80.CSI',\n",
       " '930782.CSI',\n",
       " 'h30316.CSI',\n",
       " 'h00983.CSI',\n",
       " 'h11099.CSI',\n",
       " 'h11070.CSI',\n",
       " '931105.CSI',\n",
       " 'h00806.CSI',\n",
       " 'h20793.CSI',\n",
       " 'h11002.CSI',\n",
       " '930690.CSI',\n",
       " 'CES207.CSI',\n",
       " 'h20344.CSI',\n",
       " 'h11010.CSI',\n",
       " 'h20845.CSI',\n",
       " 'h00903.CSI',\n",
       " 'h20023.CSI',\n",
       " 'h30212.CSI',\n",
       " '930650.CSI',\n",
       " 'h20602.CSI',\n",
       " 'h30345.CSI',\n",
       " 'h20739.CSI',\n",
       " 'h30376.CSI',\n",
       " 'h20178.CSI',\n",
       " 'h21024.CSI',\n",
       " 'h30209.CSI',\n",
       " 'h20697.CSI',\n",
       " '950081.CSI',\n",
       " 'h40079.CSI',\n",
       " 'n30828.CSI',\n",
       " 'h20202.CSI',\n",
       " '930869.CSI',\n",
       " 'h20600.CSI',\n",
       " 'h20390.CSI',\n",
       " '930902.CSI',\n",
       " 'h30467.CSI',\n",
       " '931118.CSI',\n",
       " 'h20975.CSI',\n",
       " 'h20094.CSI',\n",
       " 'h30025.CSI',\n",
       " 'h20213.CSI',\n",
       " '930967.CSI',\n",
       " '930846.CSI',\n",
       " 'h20865.CSI',\n",
       " 'h20029.CSI',\n",
       " 'h20536.CSI',\n",
       " 'h20380.CSI',\n",
       " 'h30128.CSI',\n",
       " 'h00814.CSI',\n",
       " 'h20533.CSI',\n",
       " 'h20658.CSI',\n",
       " '931112.CSI',\n",
       " 'h00841.CSI',\n",
       " '930855.CSI',\n",
       " 'h20716.CSI',\n",
       " 'h30468.CSI',\n",
       " 'h11061.CSI',\n",
       " 'h21002.CSI',\n",
       " 'CES204.CSI',\n",
       " '930830.CSI',\n",
       " '930655.CSI',\n",
       " 'h20561.CSI',\n",
       " '000920.CSI',\n",
       " '930725.CSI',\n",
       " '930687.CSI',\n",
       " 'h11163.CSI',\n",
       " 'h20198.CSI',\n",
       " 'h20005.CSI',\n",
       " 'h21058.CSI',\n",
       " 'h50053.CSI',\n",
       " 'h11018.CSI',\n",
       " 'h21033.CSI',\n",
       " ...}"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "set(tmp[\"ts_code\"].values)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "datetime.date(2019, 4, 22)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_csv(\"C:\\\\quanttime\\\\data\\\\index\\\\jq\\\\000001.XSHG.csv\",index_col=[\"date\"],parse_dates=[\"date\"])\n",
    "data.index[-1].date()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>display_name</th>\n",
       "      <th>name</th>\n",
       "      <th>start_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>000001.XSHE</th>\n",
       "      <td>平安银行</td>\n",
       "      <td>PAYH</td>\n",
       "      <td>1991-04-03</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000002.XSHE</th>\n",
       "      <td>万科A</td>\n",
       "      <td>WKA</td>\n",
       "      <td>1991-01-29</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000004.XSHE</th>\n",
       "      <td>国农科技</td>\n",
       "      <td>GNKJ</td>\n",
       "      <td>1990-12-01</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000005.XSHE</th>\n",
       "      <td>世纪星源</td>\n",
       "      <td>SJXY</td>\n",
       "      <td>1990-12-10</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000006.XSHE</th>\n",
       "      <td>深振业A</td>\n",
       "      <td>SZYA</td>\n",
       "      <td>1992-04-27</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000007.XSHE</th>\n",
       "      <td>全新好</td>\n",
       "      <td>QXH</td>\n",
       "      <td>1992-04-13</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000008.XSHE</th>\n",
       "      <td>神州高铁</td>\n",
       "      <td>SZGT</td>\n",
       "      <td>1992-05-07</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000009.XSHE</th>\n",
       "      <td>中国宝安</td>\n",
       "      <td>ZGBA</td>\n",
       "      <td>1991-06-25</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000010.XSHE</th>\n",
       "      <td>*ST美丽</td>\n",
       "      <td>*STML</td>\n",
       "      <td>1995-10-27</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000011.XSHE</th>\n",
       "      <td>深物业A</td>\n",
       "      <td>SWYA</td>\n",
       "      <td>1992-03-30</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000012.XSHE</th>\n",
       "      <td>南玻A</td>\n",
       "      <td>NBA</td>\n",
       "      <td>1992-02-28</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000014.XSHE</th>\n",
       "      <td>沙河股份</td>\n",
       "      <td>SHGF</td>\n",
       "      <td>1992-06-02</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000016.XSHE</th>\n",
       "      <td>深康佳A</td>\n",
       "      <td>SKJA</td>\n",
       "      <td>1992-03-27</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000017.XSHE</th>\n",
       "      <td>深中华A</td>\n",
       "      <td>SZHA</td>\n",
       "      <td>1992-03-31</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000018.XSHE</th>\n",
       "      <td>*ST神城</td>\n",
       "      <td>*STSC</td>\n",
       "      <td>1992-06-16</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000019.XSHE</th>\n",
       "      <td>深粮控股</td>\n",
       "      <td>SLKG</td>\n",
       "      <td>1992-10-12</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000020.XSHE</th>\n",
       "      <td>深华发A</td>\n",
       "      <td>SHFA</td>\n",
       "      <td>1992-04-28</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000021.XSHE</th>\n",
       "      <td>深科技</td>\n",
       "      <td>SKJ</td>\n",
       "      <td>1994-02-02</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000023.XSHE</th>\n",
       "      <td>深天地A</td>\n",
       "      <td>STDA</td>\n",
       "      <td>1993-04-29</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000025.XSHE</th>\n",
       "      <td>特力A</td>\n",
       "      <td>TLA</td>\n",
       "      <td>1993-06-21</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000026.XSHE</th>\n",
       "      <td>飞亚达A</td>\n",
       "      <td>FYDA</td>\n",
       "      <td>1993-06-03</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000027.XSHE</th>\n",
       "      <td>深圳能源</td>\n",
       "      <td>SZNY</td>\n",
       "      <td>1993-09-03</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000028.XSHE</th>\n",
       "      <td>国药一致</td>\n",
       "      <td>GYYZ</td>\n",
       "      <td>1993-08-09</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000029.XSHE</th>\n",
       "      <td>深深房A</td>\n",
       "      <td>SSFA</td>\n",
       "      <td>1993-09-15</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000030.XSHE</th>\n",
       "      <td>富奥股份</td>\n",
       "      <td>FAGF</td>\n",
       "      <td>1993-09-29</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000031.XSHE</th>\n",
       "      <td>大悦城</td>\n",
       "      <td>DYC</td>\n",
       "      <td>1993-10-08</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000032.XSHE</th>\n",
       "      <td>深桑达A</td>\n",
       "      <td>SSDA</td>\n",
       "      <td>1993-10-28</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000034.XSHE</th>\n",
       "      <td>神州数码</td>\n",
       "      <td>SXTF</td>\n",
       "      <td>1994-05-09</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000035.XSHE</th>\n",
       "      <td>中国天楹</td>\n",
       "      <td>ZGTY</td>\n",
       "      <td>1994-04-08</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>000036.XSHE</th>\n",
       "      <td>华联控股</td>\n",
       "      <td>HLKG</td>\n",
       "      <td>1994-06-17</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603939.XSHG</th>\n",
       "      <td>益丰药房</td>\n",
       "      <td>YFYF</td>\n",
       "      <td>2015-02-17</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603955.XSHG</th>\n",
       "      <td>大千生态</td>\n",
       "      <td>DQST</td>\n",
       "      <td>2017-03-10</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603956.XSHG</th>\n",
       "      <td>威派格</td>\n",
       "      <td>WPG</td>\n",
       "      <td>2019-02-22</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603958.XSHG</th>\n",
       "      <td>哈森股份</td>\n",
       "      <td>HSGF</td>\n",
       "      <td>2016-06-29</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603959.XSHG</th>\n",
       "      <td>百利科技</td>\n",
       "      <td>BLKJ</td>\n",
       "      <td>2016-05-17</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603960.XSHG</th>\n",
       "      <td>克来机电</td>\n",
       "      <td>KLJD</td>\n",
       "      <td>2017-03-14</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603963.XSHG</th>\n",
       "      <td>大理药业</td>\n",
       "      <td>DLYY</td>\n",
       "      <td>2017-09-22</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603966.XSHG</th>\n",
       "      <td>法兰泰克</td>\n",
       "      <td>FLTK</td>\n",
       "      <td>2017-01-25</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603967.XSHG</th>\n",
       "      <td>中创物流</td>\n",
       "      <td>ZCWL</td>\n",
       "      <td>2019-04-29</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603968.XSHG</th>\n",
       "      <td>醋化股份</td>\n",
       "      <td>CHGF</td>\n",
       "      <td>2015-05-18</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603969.XSHG</th>\n",
       "      <td>银龙股份</td>\n",
       "      <td>YLGF</td>\n",
       "      <td>2015-02-27</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603970.XSHG</th>\n",
       "      <td>中农立华</td>\n",
       "      <td>ZNLH</td>\n",
       "      <td>2017-11-16</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603976.XSHG</th>\n",
       "      <td>正川股份</td>\n",
       "      <td>ZCGF</td>\n",
       "      <td>2017-08-22</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603977.XSHG</th>\n",
       "      <td>国泰集团</td>\n",
       "      <td>GTJT</td>\n",
       "      <td>2016-11-11</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603978.XSHG</th>\n",
       "      <td>深圳新星</td>\n",
       "      <td>SZXX</td>\n",
       "      <td>2017-08-07</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603979.XSHG</th>\n",
       "      <td>金诚信</td>\n",
       "      <td>JCX</td>\n",
       "      <td>2015-06-30</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603980.XSHG</th>\n",
       "      <td>吉华集团</td>\n",
       "      <td>JHJT</td>\n",
       "      <td>2017-06-15</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603982.XSHG</th>\n",
       "      <td>泉峰汽车</td>\n",
       "      <td>QFQC</td>\n",
       "      <td>2019-05-22</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603985.XSHG</th>\n",
       "      <td>恒润股份</td>\n",
       "      <td>HRGF</td>\n",
       "      <td>2017-05-05</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603986.XSHG</th>\n",
       "      <td>兆易创新</td>\n",
       "      <td>ZYCX</td>\n",
       "      <td>2016-08-18</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603987.XSHG</th>\n",
       "      <td>康德莱</td>\n",
       "      <td>KDL</td>\n",
       "      <td>2016-11-21</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603988.XSHG</th>\n",
       "      <td>中电电机</td>\n",
       "      <td>ZDDJ</td>\n",
       "      <td>2014-11-04</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603989.XSHG</th>\n",
       "      <td>艾华集团</td>\n",
       "      <td>AHJT</td>\n",
       "      <td>2015-05-15</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603990.XSHG</th>\n",
       "      <td>麦迪科技</td>\n",
       "      <td>MDKJ</td>\n",
       "      <td>2016-12-08</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603991.XSHG</th>\n",
       "      <td>至正股份</td>\n",
       "      <td>ZZGF</td>\n",
       "      <td>2017-03-08</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603993.XSHG</th>\n",
       "      <td>洛阳钼业</td>\n",
       "      <td>LYMY</td>\n",
       "      <td>2012-10-09</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603996.XSHG</th>\n",
       "      <td>ST中新</td>\n",
       "      <td>STZX</td>\n",
       "      <td>2015-12-22</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603997.XSHG</th>\n",
       "      <td>继峰股份</td>\n",
       "      <td>JFGF</td>\n",
       "      <td>2015-03-02</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603998.XSHG</th>\n",
       "      <td>方盛制药</td>\n",
       "      <td>FSZY</td>\n",
       "      <td>2014-12-05</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>603999.XSHG</th>\n",
       "      <td>读者传媒</td>\n",
       "      <td>DZCM</td>\n",
       "      <td>2015-12-10</td>\n",
       "      <td>2200-01-01</td>\n",
       "      <td>stock</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3622 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            display_name   name start_date   end_date   type\n",
       "000001.XSHE         平安银行   PAYH 1991-04-03 2200-01-01  stock\n",
       "000002.XSHE          万科A    WKA 1991-01-29 2200-01-01  stock\n",
       "000004.XSHE         国农科技   GNKJ 1990-12-01 2200-01-01  stock\n",
       "000005.XSHE         世纪星源   SJXY 1990-12-10 2200-01-01  stock\n",
       "000006.XSHE         深振业A   SZYA 1992-04-27 2200-01-01  stock\n",
       "000007.XSHE          全新好    QXH 1992-04-13 2200-01-01  stock\n",
       "000008.XSHE         神州高铁   SZGT 1992-05-07 2200-01-01  stock\n",
       "000009.XSHE         中国宝安   ZGBA 1991-06-25 2200-01-01  stock\n",
       "000010.XSHE        *ST美丽  *STML 1995-10-27 2200-01-01  stock\n",
       "000011.XSHE         深物业A   SWYA 1992-03-30 2200-01-01  stock\n",
       "000012.XSHE          南玻A    NBA 1992-02-28 2200-01-01  stock\n",
       "000014.XSHE         沙河股份   SHGF 1992-06-02 2200-01-01  stock\n",
       "000016.XSHE         深康佳A   SKJA 1992-03-27 2200-01-01  stock\n",
       "000017.XSHE         深中华A   SZHA 1992-03-31 2200-01-01  stock\n",
       "000018.XSHE        *ST神城  *STSC 1992-06-16 2200-01-01  stock\n",
       "000019.XSHE         深粮控股   SLKG 1992-10-12 2200-01-01  stock\n",
       "000020.XSHE         深华发A   SHFA 1992-04-28 2200-01-01  stock\n",
       "000021.XSHE          深科技    SKJ 1994-02-02 2200-01-01  stock\n",
       "000023.XSHE         深天地A   STDA 1993-04-29 2200-01-01  stock\n",
       "000025.XSHE          特力A    TLA 1993-06-21 2200-01-01  stock\n",
       "000026.XSHE         飞亚达A   FYDA 1993-06-03 2200-01-01  stock\n",
       "000027.XSHE         深圳能源   SZNY 1993-09-03 2200-01-01  stock\n",
       "000028.XSHE         国药一致   GYYZ 1993-08-09 2200-01-01  stock\n",
       "000029.XSHE         深深房A   SSFA 1993-09-15 2200-01-01  stock\n",
       "000030.XSHE         富奥股份   FAGF 1993-09-29 2200-01-01  stock\n",
       "000031.XSHE          大悦城    DYC 1993-10-08 2200-01-01  stock\n",
       "000032.XSHE         深桑达A   SSDA 1993-10-28 2200-01-01  stock\n",
       "000034.XSHE         神州数码   SXTF 1994-05-09 2200-01-01  stock\n",
       "000035.XSHE         中国天楹   ZGTY 1994-04-08 2200-01-01  stock\n",
       "000036.XSHE         华联控股   HLKG 1994-06-17 2200-01-01  stock\n",
       "...                  ...    ...        ...        ...    ...\n",
       "603939.XSHG         益丰药房   YFYF 2015-02-17 2200-01-01  stock\n",
       "603955.XSHG         大千生态   DQST 2017-03-10 2200-01-01  stock\n",
       "603956.XSHG          威派格    WPG 2019-02-22 2200-01-01  stock\n",
       "603958.XSHG         哈森股份   HSGF 2016-06-29 2200-01-01  stock\n",
       "603959.XSHG         百利科技   BLKJ 2016-05-17 2200-01-01  stock\n",
       "603960.XSHG         克来机电   KLJD 2017-03-14 2200-01-01  stock\n",
       "603963.XSHG         大理药业   DLYY 2017-09-22 2200-01-01  stock\n",
       "603966.XSHG         法兰泰克   FLTK 2017-01-25 2200-01-01  stock\n",
       "603967.XSHG         中创物流   ZCWL 2019-04-29 2200-01-01  stock\n",
       "603968.XSHG         醋化股份   CHGF 2015-05-18 2200-01-01  stock\n",
       "603969.XSHG         银龙股份   YLGF 2015-02-27 2200-01-01  stock\n",
       "603970.XSHG         中农立华   ZNLH 2017-11-16 2200-01-01  stock\n",
       "603976.XSHG         正川股份   ZCGF 2017-08-22 2200-01-01  stock\n",
       "603977.XSHG         国泰集团   GTJT 2016-11-11 2200-01-01  stock\n",
       "603978.XSHG         深圳新星   SZXX 2017-08-07 2200-01-01  stock\n",
       "603979.XSHG          金诚信    JCX 2015-06-30 2200-01-01  stock\n",
       "603980.XSHG         吉华集团   JHJT 2017-06-15 2200-01-01  stock\n",
       "603982.XSHG         泉峰汽车   QFQC 2019-05-22 2200-01-01  stock\n",
       "603985.XSHG         恒润股份   HRGF 2017-05-05 2200-01-01  stock\n",
       "603986.XSHG         兆易创新   ZYCX 2016-08-18 2200-01-01  stock\n",
       "603987.XSHG          康德莱    KDL 2016-11-21 2200-01-01  stock\n",
       "603988.XSHG         中电电机   ZDDJ 2014-11-04 2200-01-01  stock\n",
       "603989.XSHG         艾华集团   AHJT 2015-05-15 2200-01-01  stock\n",
       "603990.XSHG         麦迪科技   MDKJ 2016-12-08 2200-01-01  stock\n",
       "603991.XSHG         至正股份   ZZGF 2017-03-08 2200-01-01  stock\n",
       "603993.XSHG         洛阳钼业   LYMY 2012-10-09 2200-01-01  stock\n",
       "603996.XSHG         ST中新   STZX 2015-12-22 2200-01-01  stock\n",
       "603997.XSHG         继峰股份   JFGF 2015-03-02 2200-01-01  stock\n",
       "603998.XSHG         方盛制药   FSZY 2014-12-05 2200-01-01  stock\n",
       "603999.XSHG         读者传媒   DZCM 2015-12-10 2200-01-01  stock\n",
       "\n",
       "[3622 rows x 5 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_stocks_info = get_all_securities(types=['stock'])\n",
    "# 提取还在上市的股票\n",
    "df_stocks_info = df_stocks_info[df_stocks_info[\"end_date\"]==\"2200-01-01\"]\n",
    "\n",
    "df_stocks_info\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>code</th>\n",
       "      <th>pe_ratio</th>\n",
       "      <th>turnover_ratio</th>\n",
       "      <th>pb_ratio</th>\n",
       "      <th>ps_ratio</th>\n",
       "      <th>pcf_ratio</th>\n",
       "      <th>capitalization</th>\n",
       "      <th>market_cap</th>\n",
       "      <th>circulating_cap</th>\n",
       "      <th>circulating_market_cap</th>\n",
       "      <th>day</th>\n",
       "      <th>pe_ratio_lyr</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>35776561</td>\n",
       "      <td>300028.XSHE</td>\n",
       "      <td>-9.5057</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>1.8705</td>\n",
       "      <td>63.3987</td>\n",
       "      <td>-63.7686</td>\n",
       "      <td>3.439800e+04</td>\n",
       "      <td>2.6486</td>\n",
       "      <td>3.439750e+04</td>\n",
       "      <td>2.6486</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-11.4132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>35775859</td>\n",
       "      <td>002260.XSHE</td>\n",
       "      <td>-5.3166</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>-2.3693</td>\n",
       "      <td>1.2707</td>\n",
       "      <td>-21.6364</td>\n",
       "      <td>2.652000e+04</td>\n",
       "      <td>8.3538</td>\n",
       "      <td>2.652000e+04</td>\n",
       "      <td>8.3538</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-4.8431</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>35776098</td>\n",
       "      <td>002499.XSHE</td>\n",
       "      <td>-1.4614</td>\n",
       "      <td>0.3498</td>\n",
       "      <td>4.5115</td>\n",
       "      <td>-109.1946</td>\n",
       "      <td>-31.8425</td>\n",
       "      <td>1.890000e+04</td>\n",
       "      <td>8.4294</td>\n",
       "      <td>1.889842e+04</td>\n",
       "      <td>8.4287</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-1.5653</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>35777669</td>\n",
       "      <td>600462.XSHG</td>\n",
       "      <td>-3.0315</td>\n",
       "      <td>1.6184</td>\n",
       "      <td>-395.1271</td>\n",
       "      <td>0.4321</td>\n",
       "      <td>-11.5978</td>\n",
       "      <td>5.337800e+04</td>\n",
       "      <td>8.4337</td>\n",
       "      <td>5.337800e+04</td>\n",
       "      <td>8.4337</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-3.0977</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>35775383</td>\n",
       "      <td>000693.XSHE</td>\n",
       "      <td>-0.3690</td>\n",
       "      <td>0.0003</td>\n",
       "      <td>-0.5367</td>\n",
       "      <td>20.2418</td>\n",
       "      <td>-1316.7686</td>\n",
       "      <td>5.434919e+04</td>\n",
       "      <td>8.5872</td>\n",
       "      <td>2.582075e+04</td>\n",
       "      <td>4.0797</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-0.3753</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>35776227</td>\n",
       "      <td>002629.XSHE</td>\n",
       "      <td>-1.4557</td>\n",
       "      <td>5.4689</td>\n",
       "      <td>44.7005</td>\n",
       "      <td>0.4378</td>\n",
       "      <td>238.9984</td>\n",
       "      <td>4.119480e+04</td>\n",
       "      <td>8.8981</td>\n",
       "      <td>3.446004e+04</td>\n",
       "      <td>7.4434</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-1.4384</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>35776358</td>\n",
       "      <td>002766.XSHE</td>\n",
       "      <td>-2.3014</td>\n",
       "      <td>4.8453</td>\n",
       "      <td>0.7607</td>\n",
       "      <td>0.7964</td>\n",
       "      <td>-1.5609</td>\n",
       "      <td>4.217540e+04</td>\n",
       "      <td>9.5316</td>\n",
       "      <td>2.488017e+04</td>\n",
       "      <td>5.6229</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-3.0358</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>35775672</td>\n",
       "      <td>002072.XSHE</td>\n",
       "      <td>-3.9181</td>\n",
       "      <td>8.7622</td>\n",
       "      <td>-5.0440</td>\n",
       "      <td>-65.6808</td>\n",
       "      <td>-457.2749</td>\n",
       "      <td>1.760000e+04</td>\n",
       "      <td>9.7504</td>\n",
       "      <td>1.668569e+04</td>\n",
       "      <td>9.2439</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-3.8967</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>35775922</td>\n",
       "      <td>002323.XSHE</td>\n",
       "      <td>-2.0433</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>2.7580</td>\n",
       "      <td>9.6601</td>\n",
       "      <td>-340.6364</td>\n",
       "      <td>7.457297e+04</td>\n",
       "      <td>9.7691</td>\n",
       "      <td>3.176186e+04</td>\n",
       "      <td>4.1608</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-2.1240</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>35778049</td>\n",
       "      <td>600891.XSHG</td>\n",
       "      <td>-0.2363</td>\n",
       "      <td>2.1609</td>\n",
       "      <td>-0.8680</td>\n",
       "      <td>0.5174</td>\n",
       "      <td>-7.9185</td>\n",
       "      <td>6.175858e+04</td>\n",
       "      <td>9.9431</td>\n",
       "      <td>3.842421e+04</td>\n",
       "      <td>6.1863</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-0.2407</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>35775559</td>\n",
       "      <td>000953.XSHE</td>\n",
       "      <td>-4.0229</td>\n",
       "      <td>0.4233</td>\n",
       "      <td>-3.7965</td>\n",
       "      <td>5.1150</td>\n",
       "      <td>-178.8226</td>\n",
       "      <td>2.940594e+04</td>\n",
       "      <td>10.0862</td>\n",
       "      <td>2.940594e+04</td>\n",
       "      <td>10.0862</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-3.6839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>35775423</td>\n",
       "      <td>000752.XSHE</td>\n",
       "      <td>-2.4193</td>\n",
       "      <td>1.8880</td>\n",
       "      <td>3.0025</td>\n",
       "      <td>3.4884</td>\n",
       "      <td>-10.9632</td>\n",
       "      <td>2.637585e+04</td>\n",
       "      <td>10.5767</td>\n",
       "      <td>2.637585e+04</td>\n",
       "      <td>10.5767</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-2.5674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>35777815</td>\n",
       "      <td>600634.XSHG</td>\n",
       "      <td>-0.1981</td>\n",
       "      <td>1.0474</td>\n",
       "      <td>-0.3081</td>\n",
       "      <td>1.2214</td>\n",
       "      <td>-19.4718</td>\n",
       "      <td>5.757321e+04</td>\n",
       "      <td>10.9389</td>\n",
       "      <td>5.757321e+04</td>\n",
       "      <td>10.9389</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-0.1986</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>35775788</td>\n",
       "      <td>002188.XSHE</td>\n",
       "      <td>-1.9932</td>\n",
       "      <td>0.6272</td>\n",
       "      <td>-1.7634</td>\n",
       "      <td>8.6753</td>\n",
       "      <td>-28.5849</td>\n",
       "      <td>2.956275e+04</td>\n",
       "      <td>11.0269</td>\n",
       "      <td>2.258341e+04</td>\n",
       "      <td>8.4236</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-1.7207</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>35775621</td>\n",
       "      <td>002021.XSHE</td>\n",
       "      <td>-5.0325</td>\n",
       "      <td>0.7035</td>\n",
       "      <td>1.6612</td>\n",
       "      <td>1.0508</td>\n",
       "      <td>-13.8838</td>\n",
       "      <td>6.878151e+04</td>\n",
       "      <td>11.5553</td>\n",
       "      <td>6.874626e+04</td>\n",
       "      <td>11.5494</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-4.8587</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>35777619</td>\n",
       "      <td>600385.XSHG</td>\n",
       "      <td>-107.7612</td>\n",
       "      <td>0.1441</td>\n",
       "      <td>21.3860</td>\n",
       "      <td>216.9323</td>\n",
       "      <td>302.7035</td>\n",
       "      <td>1.481071e+04</td>\n",
       "      <td>11.5672</td>\n",
       "      <td>1.427738e+04</td>\n",
       "      <td>11.1506</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-113.8524</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>35776202</td>\n",
       "      <td>002604.XSHE</td>\n",
       "      <td>-0.4075</td>\n",
       "      <td>0.0000</td>\n",
       "      <td>-0.3526</td>\n",
       "      <td>1.6397</td>\n",
       "      <td>-10.0481</td>\n",
       "      <td>5.995614e+04</td>\n",
       "      <td>11.7514</td>\n",
       "      <td>5.128325e+04</td>\n",
       "      <td>10.0515</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-0.4189</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>35775800</td>\n",
       "      <td>002200.XSHE</td>\n",
       "      <td>-5.6577</td>\n",
       "      <td>0.6064</td>\n",
       "      <td>7.1296</td>\n",
       "      <td>1.5766</td>\n",
       "      <td>-98.0236</td>\n",
       "      <td>1.841329e+04</td>\n",
       "      <td>11.8213</td>\n",
       "      <td>1.316181e+04</td>\n",
       "      <td>8.4499</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-4.6286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>35775670</td>\n",
       "      <td>002070.XSHE</td>\n",
       "      <td>-2.0806</td>\n",
       "      <td>0.0314</td>\n",
       "      <td>-1.0307</td>\n",
       "      <td>5.5794</td>\n",
       "      <td>-57.8422</td>\n",
       "      <td>6.352582e+04</td>\n",
       "      <td>11.8793</td>\n",
       "      <td>5.807955e+04</td>\n",
       "      <td>10.8609</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-2.0739</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>35775430</td>\n",
       "      <td>000760.XSHE</td>\n",
       "      <td>-0.9371</td>\n",
       "      <td>1.3662</td>\n",
       "      <td>2.3280</td>\n",
       "      <td>8.1990</td>\n",
       "      <td>-2.0170</td>\n",
       "      <td>7.718446e+04</td>\n",
       "      <td>12.1180</td>\n",
       "      <td>6.544443e+04</td>\n",
       "      <td>10.2748</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-0.9262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>35776562</td>\n",
       "      <td>300029.XSHE</td>\n",
       "      <td>-9.5884</td>\n",
       "      <td>11.6728</td>\n",
       "      <td>10.4821</td>\n",
       "      <td>113.5339</td>\n",
       "      <td>-35.8402</td>\n",
       "      <td>2.000000e+04</td>\n",
       "      <td>12.1600</td>\n",
       "      <td>2.000000e+04</td>\n",
       "      <td>12.1600</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-8.9490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>35776019</td>\n",
       "      <td>002420.XSHE</td>\n",
       "      <td>-1.5138</td>\n",
       "      <td>0.3605</td>\n",
       "      <td>3.2604</td>\n",
       "      <td>0.2681</td>\n",
       "      <td>-47.5733</td>\n",
       "      <td>4.010000e+04</td>\n",
       "      <td>12.2305</td>\n",
       "      <td>3.917175e+04</td>\n",
       "      <td>11.9474</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-1.5031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>35775325</td>\n",
       "      <td>000611.XSHE</td>\n",
       "      <td>-9.0092</td>\n",
       "      <td>0.7209</td>\n",
       "      <td>3.2713</td>\n",
       "      <td>88.9217</td>\n",
       "      <td>-2173.9619</td>\n",
       "      <td>3.378220e+04</td>\n",
       "      <td>12.2629</td>\n",
       "      <td>3.193479e+04</td>\n",
       "      <td>11.5923</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-8.7935</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>35775820</td>\n",
       "      <td>002220.XSHE</td>\n",
       "      <td>-3.9276</td>\n",
       "      <td>3.9969</td>\n",
       "      <td>0.5058</td>\n",
       "      <td>1.3490</td>\n",
       "      <td>-13.2660</td>\n",
       "      <td>7.664802e+04</td>\n",
       "      <td>12.3403</td>\n",
       "      <td>6.611287e+04</td>\n",
       "      <td>10.6442</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-7.4682</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>35775381</td>\n",
       "      <td>000691.XSHE</td>\n",
       "      <td>113.9177</td>\n",
       "      <td>1.1954</td>\n",
       "      <td>14.7556</td>\n",
       "      <td>31.7564</td>\n",
       "      <td>-54.2415</td>\n",
       "      <td>3.232700e+04</td>\n",
       "      <td>12.3812</td>\n",
       "      <td>2.904863e+04</td>\n",
       "      <td>11.1256</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>112.5305</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>35777981</td>\n",
       "      <td>600817.XSHG</td>\n",
       "      <td>263.5206</td>\n",
       "      <td>0.4307</td>\n",
       "      <td>12.1841</td>\n",
       "      <td>27.8657</td>\n",
       "      <td>-79.6971</td>\n",
       "      <td>1.609101e+04</td>\n",
       "      <td>12.3901</td>\n",
       "      <td>1.556791e+04</td>\n",
       "      <td>11.9873</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>247.9910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>35776072</td>\n",
       "      <td>002473.XSHE</td>\n",
       "      <td>96.0040</td>\n",
       "      <td>1.2088</td>\n",
       "      <td>4.3991</td>\n",
       "      <td>8.7465</td>\n",
       "      <td>12.8049</td>\n",
       "      <td>1.600000e+04</td>\n",
       "      <td>12.6880</td>\n",
       "      <td>1.600000e+04</td>\n",
       "      <td>12.6880</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>105.0255</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>35778320</td>\n",
       "      <td>603029.XSHG</td>\n",
       "      <td>129.8180</td>\n",
       "      <td>0.6605</td>\n",
       "      <td>1.8066</td>\n",
       "      <td>3.6325</td>\n",
       "      <td>-15.1870</td>\n",
       "      <td>9.334000e+03</td>\n",
       "      <td>12.9556</td>\n",
       "      <td>9.334000e+03</td>\n",
       "      <td>12.9556</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>85.8023</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>35775809</td>\n",
       "      <td>002209.XSHE</td>\n",
       "      <td>1935.2522</td>\n",
       "      <td>1.3272</td>\n",
       "      <td>2.0460</td>\n",
       "      <td>1.4390</td>\n",
       "      <td>-139.6376</td>\n",
       "      <td>1.952440e+04</td>\n",
       "      <td>13.0033</td>\n",
       "      <td>1.537469e+04</td>\n",
       "      <td>10.2395</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>125.6841</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>35777552</td>\n",
       "      <td>600306.XSHG</td>\n",
       "      <td>-10.5988</td>\n",
       "      <td>0.7326</td>\n",
       "      <td>580.3030</td>\n",
       "      <td>1.2403</td>\n",
       "      <td>-25.5364</td>\n",
       "      <td>1.781389e+04</td>\n",
       "      <td>13.0041</td>\n",
       "      <td>1.774057e+04</td>\n",
       "      <td>12.9506</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>-10.1862</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3592</th>\n",
       "      <td>35776014</td>\n",
       "      <td>002415.XSHE</td>\n",
       "      <td>20.8362</td>\n",
       "      <td>0.8276</td>\n",
       "      <td>6.8637</td>\n",
       "      <td>4.5764</td>\n",
       "      <td>19.2308</td>\n",
       "      <td>9.348466e+05</td>\n",
       "      <td>2307.2014</td>\n",
       "      <td>8.074704e+05</td>\n",
       "      <td>1992.8372</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>20.3226</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3593</th>\n",
       "      <td>35778226</td>\n",
       "      <td>601668.XSHG</td>\n",
       "      <td>6.0243</td>\n",
       "      <td>0.1509</td>\n",
       "      <td>1.0170</td>\n",
       "      <td>0.1913</td>\n",
       "      <td>4.8440</td>\n",
       "      <td>4.198126e+06</td>\n",
       "      <td>2346.7527</td>\n",
       "      <td>4.114108e+06</td>\n",
       "      <td>2299.7861</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.1367</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3594</th>\n",
       "      <td>35777318</td>\n",
       "      <td>600030.XSHG</td>\n",
       "      <td>22.2594</td>\n",
       "      <td>0.6759</td>\n",
       "      <td>1.5446</td>\n",
       "      <td>6.4134</td>\n",
       "      <td>9.6757</td>\n",
       "      <td>1.211691e+06</td>\n",
       "      <td>2439.1338</td>\n",
       "      <td>9.814662e+05</td>\n",
       "      <td>1975.6914</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>25.9762</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3595</th>\n",
       "      <td>35778148</td>\n",
       "      <td>601138.XSHG</td>\n",
       "      <td>15.1591</td>\n",
       "      <td>2.2211</td>\n",
       "      <td>3.4203</td>\n",
       "      <td>0.6213</td>\n",
       "      <td>7.8442</td>\n",
       "      <td>1.984448e+06</td>\n",
       "      <td>2595.6584</td>\n",
       "      <td>1.117890e+05</td>\n",
       "      <td>146.2200</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>15.3568</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3596</th>\n",
       "      <td>35778439</td>\n",
       "      <td>603288.XSHG</td>\n",
       "      <td>58.1380</td>\n",
       "      <td>0.2205</td>\n",
       "      <td>21.2274</td>\n",
       "      <td>15.1267</td>\n",
       "      <td>68.3047</td>\n",
       "      <td>2.700369e+05</td>\n",
       "      <td>2697.1289</td>\n",
       "      <td>2.700369e+05</td>\n",
       "      <td>2697.1289</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>61.7925</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3597</th>\n",
       "      <td>35777305</td>\n",
       "      <td>600016.XSHG</td>\n",
       "      <td>5.2870</td>\n",
       "      <td>0.1472</td>\n",
       "      <td>0.6337</td>\n",
       "      <td>1.6511</td>\n",
       "      <td>20.0293</td>\n",
       "      <td>4.378242e+06</td>\n",
       "      <td>2705.7534</td>\n",
       "      <td>3.546212e+06</td>\n",
       "      <td>2191.5591</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>5.3763</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3598</th>\n",
       "      <td>35777526</td>\n",
       "      <td>600276.XSHG</td>\n",
       "      <td>63.6719</td>\n",
       "      <td>0.3689</td>\n",
       "      <td>13.4318</td>\n",
       "      <td>14.8075</td>\n",
       "      <td>-1778.7600</td>\n",
       "      <td>4.422814e+05</td>\n",
       "      <td>2743.4717</td>\n",
       "      <td>4.403915e+05</td>\n",
       "      <td>2731.7485</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>67.4800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3599</th>\n",
       "      <td>35778292</td>\n",
       "      <td>601998.XSHG</td>\n",
       "      <td>6.2507</td>\n",
       "      <td>0.0363</td>\n",
       "      <td>0.6808</td>\n",
       "      <td>1.6498</td>\n",
       "      <td>-2.6431</td>\n",
       "      <td>4.893480e+06</td>\n",
       "      <td>2848.0051</td>\n",
       "      <td>3.190516e+06</td>\n",
       "      <td>1856.8805</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.3981</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3600</th>\n",
       "      <td>35777377</td>\n",
       "      <td>600104.XSHG</td>\n",
       "      <td>8.3416</td>\n",
       "      <td>0.1658</td>\n",
       "      <td>1.1740</td>\n",
       "      <td>0.3338</td>\n",
       "      <td>-15.5581</td>\n",
       "      <td>1.168346e+06</td>\n",
       "      <td>2882.3098</td>\n",
       "      <td>1.150343e+06</td>\n",
       "      <td>2837.8970</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>8.0044</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3601</th>\n",
       "      <td>35775139</td>\n",
       "      <td>000002.XSHE</td>\n",
       "      <td>8.7430</td>\n",
       "      <td>0.2092</td>\n",
       "      <td>1.8867</td>\n",
       "      <td>0.9430</td>\n",
       "      <td>6.2022</td>\n",
       "      <td>1.130214e+06</td>\n",
       "      <td>2972.4636</td>\n",
       "      <td>9.715170e+05</td>\n",
       "      <td>2555.0896</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>8.8014</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3602</th>\n",
       "      <td>35775350</td>\n",
       "      <td>000651.XSHE</td>\n",
       "      <td>11.7784</td>\n",
       "      <td>0.6212</td>\n",
       "      <td>3.3125</td>\n",
       "      <td>1.5407</td>\n",
       "      <td>-296.0337</td>\n",
       "      <td>6.015731e+05</td>\n",
       "      <td>3096.8982</td>\n",
       "      <td>5.970718e+05</td>\n",
       "      <td>3073.7253</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>11.8190</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3603</th>\n",
       "      <td>35778213</td>\n",
       "      <td>601601.XSHG</td>\n",
       "      <td>15.7496</td>\n",
       "      <td>0.2213</td>\n",
       "      <td>1.9187</td>\n",
       "      <td>0.8566</td>\n",
       "      <td>42.1192</td>\n",
       "      <td>9.062000e+05</td>\n",
       "      <td>3110.0784</td>\n",
       "      <td>6.286700e+05</td>\n",
       "      <td>2157.5955</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>17.2600</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3604</th>\n",
       "      <td>35775209</td>\n",
       "      <td>000333.XSHE</td>\n",
       "      <td>15.5571</td>\n",
       "      <td>0.2529</td>\n",
       "      <td>4.0479</td>\n",
       "      <td>1.2295</td>\n",
       "      <td>582.6705</td>\n",
       "      <td>6.605842e+05</td>\n",
       "      <td>3283.1038</td>\n",
       "      <td>6.462856e+05</td>\n",
       "      <td>3212.0393</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>16.2283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3605</th>\n",
       "      <td>35777295</td>\n",
       "      <td>600000.XSHG</td>\n",
       "      <td>5.7372</td>\n",
       "      <td>0.0892</td>\n",
       "      <td>0.7263</td>\n",
       "      <td>1.8285</td>\n",
       "      <td>-13.1736</td>\n",
       "      <td>2.935208e+06</td>\n",
       "      <td>3331.4612</td>\n",
       "      <td>2.810376e+06</td>\n",
       "      <td>3189.7771</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>5.9582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3606</th>\n",
       "      <td>35778154</td>\n",
       "      <td>601166.XSHG</td>\n",
       "      <td>5.8617</td>\n",
       "      <td>0.2765</td>\n",
       "      <td>0.8044</td>\n",
       "      <td>2.1520</td>\n",
       "      <td>1.2394</td>\n",
       "      <td>2.077419e+06</td>\n",
       "      <td>3670.7996</td>\n",
       "      <td>1.905234e+06</td>\n",
       "      <td>3366.5479</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.0554</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3607</th>\n",
       "      <td>35778131</td>\n",
       "      <td>601088.XSHG</td>\n",
       "      <td>8.2983</td>\n",
       "      <td>0.0675</td>\n",
       "      <td>1.0916</td>\n",
       "      <td>1.4409</td>\n",
       "      <td>95.3193</td>\n",
       "      <td>1.988962e+06</td>\n",
       "      <td>3719.3589</td>\n",
       "      <td>1.649104e+06</td>\n",
       "      <td>3083.8242</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>8.4787</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3608</th>\n",
       "      <td>35775492</td>\n",
       "      <td>000858.XSHE</td>\n",
       "      <td>25.8603</td>\n",
       "      <td>0.8456</td>\n",
       "      <td>5.5032</td>\n",
       "      <td>8.8059</td>\n",
       "      <td>27.5987</td>\n",
       "      <td>3.881608e+05</td>\n",
       "      <td>3850.1670</td>\n",
       "      <td>3.795768e+05</td>\n",
       "      <td>3765.0227</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>28.7664</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3609</th>\n",
       "      <td>35778057</td>\n",
       "      <td>600900.XSHG</td>\n",
       "      <td>17.0612</td>\n",
       "      <td>0.0914</td>\n",
       "      <td>2.6649</td>\n",
       "      <td>7.4934</td>\n",
       "      <td>502.2607</td>\n",
       "      <td>2.200000e+06</td>\n",
       "      <td>3872.0000</td>\n",
       "      <td>2.200000e+06</td>\n",
       "      <td>3872.0000</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>17.1245</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3610</th>\n",
       "      <td>35778182</td>\n",
       "      <td>601319.XSHG</td>\n",
       "      <td>27.6577</td>\n",
       "      <td>7.3025</td>\n",
       "      <td>2.3253</td>\n",
       "      <td>0.7572</td>\n",
       "      <td>46.1682</td>\n",
       "      <td>4.422399e+06</td>\n",
       "      <td>3896.1335</td>\n",
       "      <td>1.011240e+05</td>\n",
       "      <td>89.0902</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>28.9675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3611</th>\n",
       "      <td>35778184</td>\n",
       "      <td>601328.XSHG</td>\n",
       "      <td>6.0019</td>\n",
       "      <td>0.2318</td>\n",
       "      <td>0.6797</td>\n",
       "      <td>1.9845</td>\n",
       "      <td>-25.1689</td>\n",
       "      <td>7.426272e+06</td>\n",
       "      <td>4478.0425</td>\n",
       "      <td>3.925086e+06</td>\n",
       "      <td>2366.8271</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.0818</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3612</th>\n",
       "      <td>35777316</td>\n",
       "      <td>600028.XSHG</td>\n",
       "      <td>11.1272</td>\n",
       "      <td>0.0640</td>\n",
       "      <td>0.8888</td>\n",
       "      <td>0.2201</td>\n",
       "      <td>-22.6477</td>\n",
       "      <td>1.210712e+07</td>\n",
       "      <td>6574.1665</td>\n",
       "      <td>9.555777e+06</td>\n",
       "      <td>5188.7871</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>10.4205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3613</th>\n",
       "      <td>35778222</td>\n",
       "      <td>601628.XSHG</td>\n",
       "      <td>30.7814</td>\n",
       "      <td>0.0420</td>\n",
       "      <td>2.0642</td>\n",
       "      <td>1.0660</td>\n",
       "      <td>102.4374</td>\n",
       "      <td>2.826470e+06</td>\n",
       "      <td>7360.1294</td>\n",
       "      <td>2.082353e+06</td>\n",
       "      <td>5422.4473</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>64.5909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3614</th>\n",
       "      <td>35777322</td>\n",
       "      <td>600036.XSHG</td>\n",
       "      <td>10.3245</td>\n",
       "      <td>0.1589</td>\n",
       "      <td>1.6133</td>\n",
       "      <td>3.3525</td>\n",
       "      <td>14.2195</td>\n",
       "      <td>2.521984e+06</td>\n",
       "      <td>8582.3135</td>\n",
       "      <td>2.062894e+06</td>\n",
       "      <td>7020.0298</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>10.6533</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3615</th>\n",
       "      <td>35778285</td>\n",
       "      <td>601988.XSHG</td>\n",
       "      <td>5.9832</td>\n",
       "      <td>0.0353</td>\n",
       "      <td>0.7215</td>\n",
       "      <td>2.0982</td>\n",
       "      <td>-51.3863</td>\n",
       "      <td>2.943878e+07</td>\n",
       "      <td>10892.3486</td>\n",
       "      <td>2.107655e+07</td>\n",
       "      <td>7798.3242</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.0484</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3616</th>\n",
       "      <td>35777715</td>\n",
       "      <td>600519.XSHG</td>\n",
       "      <td>28.9980</td>\n",
       "      <td>0.3159</td>\n",
       "      <td>8.8632</td>\n",
       "      <td>13.5272</td>\n",
       "      <td>56.2651</td>\n",
       "      <td>1.256198e+05</td>\n",
       "      <td>10995.4990</td>\n",
       "      <td>1.256198e+05</td>\n",
       "      <td>10995.4990</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>31.2340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3617</th>\n",
       "      <td>35778250</td>\n",
       "      <td>601857.XSHG</td>\n",
       "      <td>24.6640</td>\n",
       "      <td>0.0296</td>\n",
       "      <td>1.0598</td>\n",
       "      <td>0.5410</td>\n",
       "      <td>-135.9825</td>\n",
       "      <td>1.830210e+07</td>\n",
       "      <td>12994.4893</td>\n",
       "      <td>1.619221e+07</td>\n",
       "      <td>11496.4678</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>24.7114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3618</th>\n",
       "      <td>35778178</td>\n",
       "      <td>601288.XSHG</td>\n",
       "      <td>6.3928</td>\n",
       "      <td>0.0724</td>\n",
       "      <td>0.7942</td>\n",
       "      <td>2.1314</td>\n",
       "      <td>11.6679</td>\n",
       "      <td>3.499830e+07</td>\n",
       "      <td>13124.3643</td>\n",
       "      <td>2.940553e+07</td>\n",
       "      <td>11027.0732</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.4721</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3619</th>\n",
       "      <td>35778181</td>\n",
       "      <td>601318.XSHG</td>\n",
       "      <td>11.2036</td>\n",
       "      <td>0.4728</td>\n",
       "      <td>2.4618</td>\n",
       "      <td>1.3655</td>\n",
       "      <td>186.6078</td>\n",
       "      <td>1.828024e+06</td>\n",
       "      <td>14253.1045</td>\n",
       "      <td>1.083266e+06</td>\n",
       "      <td>8446.2285</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>13.2706</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3620</th>\n",
       "      <td>35778275</td>\n",
       "      <td>601939.XSHG</td>\n",
       "      <td>6.8673</td>\n",
       "      <td>1.1559</td>\n",
       "      <td>0.8969</td>\n",
       "      <td>2.6622</td>\n",
       "      <td>93.7144</td>\n",
       "      <td>2.500110e+07</td>\n",
       "      <td>17700.7773</td>\n",
       "      <td>9.593658e+05</td>\n",
       "      <td>679.2310</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.9509</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3621</th>\n",
       "      <td>35778197</td>\n",
       "      <td>601398.XSHG</td>\n",
       "      <td>6.7875</td>\n",
       "      <td>0.0610</td>\n",
       "      <td>0.8774</td>\n",
       "      <td>2.5147</td>\n",
       "      <td>2.4388</td>\n",
       "      <td>3.564062e+07</td>\n",
       "      <td>20422.0781</td>\n",
       "      <td>2.696122e+07</td>\n",
       "      <td>15448.7803</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>6.8605</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3622 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            id         code   pe_ratio  turnover_ratio  pb_ratio  ps_ratio  \\\n",
       "0     35776561  300028.XSHE    -9.5057          0.0000    1.8705   63.3987   \n",
       "1     35775859  002260.XSHE    -5.3166          0.0000   -2.3693    1.2707   \n",
       "2     35776098  002499.XSHE    -1.4614          0.3498    4.5115 -109.1946   \n",
       "3     35777669  600462.XSHG    -3.0315          1.6184 -395.1271    0.4321   \n",
       "4     35775383  000693.XSHE    -0.3690          0.0003   -0.5367   20.2418   \n",
       "5     35776227  002629.XSHE    -1.4557          5.4689   44.7005    0.4378   \n",
       "6     35776358  002766.XSHE    -2.3014          4.8453    0.7607    0.7964   \n",
       "7     35775672  002072.XSHE    -3.9181          8.7622   -5.0440  -65.6808   \n",
       "8     35775922  002323.XSHE    -2.0433          0.0000    2.7580    9.6601   \n",
       "9     35778049  600891.XSHG    -0.2363          2.1609   -0.8680    0.5174   \n",
       "10    35775559  000953.XSHE    -4.0229          0.4233   -3.7965    5.1150   \n",
       "11    35775423  000752.XSHE    -2.4193          1.8880    3.0025    3.4884   \n",
       "12    35777815  600634.XSHG    -0.1981          1.0474   -0.3081    1.2214   \n",
       "13    35775788  002188.XSHE    -1.9932          0.6272   -1.7634    8.6753   \n",
       "14    35775621  002021.XSHE    -5.0325          0.7035    1.6612    1.0508   \n",
       "15    35777619  600385.XSHG  -107.7612          0.1441   21.3860  216.9323   \n",
       "16    35776202  002604.XSHE    -0.4075          0.0000   -0.3526    1.6397   \n",
       "17    35775800  002200.XSHE    -5.6577          0.6064    7.1296    1.5766   \n",
       "18    35775670  002070.XSHE    -2.0806          0.0314   -1.0307    5.5794   \n",
       "19    35775430  000760.XSHE    -0.9371          1.3662    2.3280    8.1990   \n",
       "20    35776562  300029.XSHE    -9.5884         11.6728   10.4821  113.5339   \n",
       "21    35776019  002420.XSHE    -1.5138          0.3605    3.2604    0.2681   \n",
       "22    35775325  000611.XSHE    -9.0092          0.7209    3.2713   88.9217   \n",
       "23    35775820  002220.XSHE    -3.9276          3.9969    0.5058    1.3490   \n",
       "24    35775381  000691.XSHE   113.9177          1.1954   14.7556   31.7564   \n",
       "25    35777981  600817.XSHG   263.5206          0.4307   12.1841   27.8657   \n",
       "26    35776072  002473.XSHE    96.0040          1.2088    4.3991    8.7465   \n",
       "27    35778320  603029.XSHG   129.8180          0.6605    1.8066    3.6325   \n",
       "28    35775809  002209.XSHE  1935.2522          1.3272    2.0460    1.4390   \n",
       "29    35777552  600306.XSHG   -10.5988          0.7326  580.3030    1.2403   \n",
       "...        ...          ...        ...             ...       ...       ...   \n",
       "3592  35776014  002415.XSHE    20.8362          0.8276    6.8637    4.5764   \n",
       "3593  35778226  601668.XSHG     6.0243          0.1509    1.0170    0.1913   \n",
       "3594  35777318  600030.XSHG    22.2594          0.6759    1.5446    6.4134   \n",
       "3595  35778148  601138.XSHG    15.1591          2.2211    3.4203    0.6213   \n",
       "3596  35778439  603288.XSHG    58.1380          0.2205   21.2274   15.1267   \n",
       "3597  35777305  600016.XSHG     5.2870          0.1472    0.6337    1.6511   \n",
       "3598  35777526  600276.XSHG    63.6719          0.3689   13.4318   14.8075   \n",
       "3599  35778292  601998.XSHG     6.2507          0.0363    0.6808    1.6498   \n",
       "3600  35777377  600104.XSHG     8.3416          0.1658    1.1740    0.3338   \n",
       "3601  35775139  000002.XSHE     8.7430          0.2092    1.8867    0.9430   \n",
       "3602  35775350  000651.XSHE    11.7784          0.6212    3.3125    1.5407   \n",
       "3603  35778213  601601.XSHG    15.7496          0.2213    1.9187    0.8566   \n",
       "3604  35775209  000333.XSHE    15.5571          0.2529    4.0479    1.2295   \n",
       "3605  35777295  600000.XSHG     5.7372          0.0892    0.7263    1.8285   \n",
       "3606  35778154  601166.XSHG     5.8617          0.2765    0.8044    2.1520   \n",
       "3607  35778131  601088.XSHG     8.2983          0.0675    1.0916    1.4409   \n",
       "3608  35775492  000858.XSHE    25.8603          0.8456    5.5032    8.8059   \n",
       "3609  35778057  600900.XSHG    17.0612          0.0914    2.6649    7.4934   \n",
       "3610  35778182  601319.XSHG    27.6577          7.3025    2.3253    0.7572   \n",
       "3611  35778184  601328.XSHG     6.0019          0.2318    0.6797    1.9845   \n",
       "3612  35777316  600028.XSHG    11.1272          0.0640    0.8888    0.2201   \n",
       "3613  35778222  601628.XSHG    30.7814          0.0420    2.0642    1.0660   \n",
       "3614  35777322  600036.XSHG    10.3245          0.1589    1.6133    3.3525   \n",
       "3615  35778285  601988.XSHG     5.9832          0.0353    0.7215    2.0982   \n",
       "3616  35777715  600519.XSHG    28.9980          0.3159    8.8632   13.5272   \n",
       "3617  35778250  601857.XSHG    24.6640          0.0296    1.0598    0.5410   \n",
       "3618  35778178  601288.XSHG     6.3928          0.0724    0.7942    2.1314   \n",
       "3619  35778181  601318.XSHG    11.2036          0.4728    2.4618    1.3655   \n",
       "3620  35778275  601939.XSHG     6.8673          1.1559    0.8969    2.6622   \n",
       "3621  35778197  601398.XSHG     6.7875          0.0610    0.8774    2.5147   \n",
       "\n",
       "      pcf_ratio  capitalization  market_cap  circulating_cap  \\\n",
       "0      -63.7686    3.439800e+04      2.6486     3.439750e+04   \n",
       "1      -21.6364    2.652000e+04      8.3538     2.652000e+04   \n",
       "2      -31.8425    1.890000e+04      8.4294     1.889842e+04   \n",
       "3      -11.5978    5.337800e+04      8.4337     5.337800e+04   \n",
       "4    -1316.7686    5.434919e+04      8.5872     2.582075e+04   \n",
       "5      238.9984    4.119480e+04      8.8981     3.446004e+04   \n",
       "6       -1.5609    4.217540e+04      9.5316     2.488017e+04   \n",
       "7     -457.2749    1.760000e+04      9.7504     1.668569e+04   \n",
       "8     -340.6364    7.457297e+04      9.7691     3.176186e+04   \n",
       "9       -7.9185    6.175858e+04      9.9431     3.842421e+04   \n",
       "10    -178.8226    2.940594e+04     10.0862     2.940594e+04   \n",
       "11     -10.9632    2.637585e+04     10.5767     2.637585e+04   \n",
       "12     -19.4718    5.757321e+04     10.9389     5.757321e+04   \n",
       "13     -28.5849    2.956275e+04     11.0269     2.258341e+04   \n",
       "14     -13.8838    6.878151e+04     11.5553     6.874626e+04   \n",
       "15     302.7035    1.481071e+04     11.5672     1.427738e+04   \n",
       "16     -10.0481    5.995614e+04     11.7514     5.128325e+04   \n",
       "17     -98.0236    1.841329e+04     11.8213     1.316181e+04   \n",
       "18     -57.8422    6.352582e+04     11.8793     5.807955e+04   \n",
       "19      -2.0170    7.718446e+04     12.1180     6.544443e+04   \n",
       "20     -35.8402    2.000000e+04     12.1600     2.000000e+04   \n",
       "21     -47.5733    4.010000e+04     12.2305     3.917175e+04   \n",
       "22   -2173.9619    3.378220e+04     12.2629     3.193479e+04   \n",
       "23     -13.2660    7.664802e+04     12.3403     6.611287e+04   \n",
       "24     -54.2415    3.232700e+04     12.3812     2.904863e+04   \n",
       "25     -79.6971    1.609101e+04     12.3901     1.556791e+04   \n",
       "26      12.8049    1.600000e+04     12.6880     1.600000e+04   \n",
       "27     -15.1870    9.334000e+03     12.9556     9.334000e+03   \n",
       "28    -139.6376    1.952440e+04     13.0033     1.537469e+04   \n",
       "29     -25.5364    1.781389e+04     13.0041     1.774057e+04   \n",
       "...         ...             ...         ...              ...   \n",
       "3592    19.2308    9.348466e+05   2307.2014     8.074704e+05   \n",
       "3593     4.8440    4.198126e+06   2346.7527     4.114108e+06   \n",
       "3594     9.6757    1.211691e+06   2439.1338     9.814662e+05   \n",
       "3595     7.8442    1.984448e+06   2595.6584     1.117890e+05   \n",
       "3596    68.3047    2.700369e+05   2697.1289     2.700369e+05   \n",
       "3597    20.0293    4.378242e+06   2705.7534     3.546212e+06   \n",
       "3598 -1778.7600    4.422814e+05   2743.4717     4.403915e+05   \n",
       "3599    -2.6431    4.893480e+06   2848.0051     3.190516e+06   \n",
       "3600   -15.5581    1.168346e+06   2882.3098     1.150343e+06   \n",
       "3601     6.2022    1.130214e+06   2972.4636     9.715170e+05   \n",
       "3602  -296.0337    6.015731e+05   3096.8982     5.970718e+05   \n",
       "3603    42.1192    9.062000e+05   3110.0784     6.286700e+05   \n",
       "3604   582.6705    6.605842e+05   3283.1038     6.462856e+05   \n",
       "3605   -13.1736    2.935208e+06   3331.4612     2.810376e+06   \n",
       "3606     1.2394    2.077419e+06   3670.7996     1.905234e+06   \n",
       "3607    95.3193    1.988962e+06   3719.3589     1.649104e+06   \n",
       "3608    27.5987    3.881608e+05   3850.1670     3.795768e+05   \n",
       "3609   502.2607    2.200000e+06   3872.0000     2.200000e+06   \n",
       "3610    46.1682    4.422399e+06   3896.1335     1.011240e+05   \n",
       "3611   -25.1689    7.426272e+06   4478.0425     3.925086e+06   \n",
       "3612   -22.6477    1.210712e+07   6574.1665     9.555777e+06   \n",
       "3613   102.4374    2.826470e+06   7360.1294     2.082353e+06   \n",
       "3614    14.2195    2.521984e+06   8582.3135     2.062894e+06   \n",
       "3615   -51.3863    2.943878e+07  10892.3486     2.107655e+07   \n",
       "3616    56.2651    1.256198e+05  10995.4990     1.256198e+05   \n",
       "3617  -135.9825    1.830210e+07  12994.4893     1.619221e+07   \n",
       "3618    11.6679    3.499830e+07  13124.3643     2.940553e+07   \n",
       "3619   186.6078    1.828024e+06  14253.1045     1.083266e+06   \n",
       "3620    93.7144    2.500110e+07  17700.7773     9.593658e+05   \n",
       "3621     2.4388    3.564062e+07  20422.0781     2.696122e+07   \n",
       "\n",
       "      circulating_market_cap         day  pe_ratio_lyr  \n",
       "0                     2.6486  2019-06-04      -11.4132  \n",
       "1                     8.3538  2019-06-04       -4.8431  \n",
       "2                     8.4287  2019-06-04       -1.5653  \n",
       "3                     8.4337  2019-06-04       -3.0977  \n",
       "4                     4.0797  2019-06-04       -0.3753  \n",
       "5                     7.4434  2019-06-04       -1.4384  \n",
       "6                     5.6229  2019-06-04       -3.0358  \n",
       "7                     9.2439  2019-06-04       -3.8967  \n",
       "8                     4.1608  2019-06-04       -2.1240  \n",
       "9                     6.1863  2019-06-04       -0.2407  \n",
       "10                   10.0862  2019-06-04       -3.6839  \n",
       "11                   10.5767  2019-06-04       -2.5674  \n",
       "12                   10.9389  2019-06-04       -0.1986  \n",
       "13                    8.4236  2019-06-04       -1.7207  \n",
       "14                   11.5494  2019-06-04       -4.8587  \n",
       "15                   11.1506  2019-06-04     -113.8524  \n",
       "16                   10.0515  2019-06-04       -0.4189  \n",
       "17                    8.4499  2019-06-04       -4.6286  \n",
       "18                   10.8609  2019-06-04       -2.0739  \n",
       "19                   10.2748  2019-06-04       -0.9262  \n",
       "20                   12.1600  2019-06-04       -8.9490  \n",
       "21                   11.9474  2019-06-04       -1.5031  \n",
       "22                   11.5923  2019-06-04       -8.7935  \n",
       "23                   10.6442  2019-06-04       -7.4682  \n",
       "24                   11.1256  2019-06-04      112.5305  \n",
       "25                   11.9873  2019-06-04      247.9910  \n",
       "26                   12.6880  2019-06-04      105.0255  \n",
       "27                   12.9556  2019-06-04       85.8023  \n",
       "28                   10.2395  2019-06-04      125.6841  \n",
       "29                   12.9506  2019-06-04      -10.1862  \n",
       "...                      ...         ...           ...  \n",
       "3592               1992.8372  2019-06-04       20.3226  \n",
       "3593               2299.7861  2019-06-04        6.1367  \n",
       "3594               1975.6914  2019-06-04       25.9762  \n",
       "3595                146.2200  2019-06-04       15.3568  \n",
       "3596               2697.1289  2019-06-04       61.7925  \n",
       "3597               2191.5591  2019-06-04        5.3763  \n",
       "3598               2731.7485  2019-06-04       67.4800  \n",
       "3599               1856.8805  2019-06-04        6.3981  \n",
       "3600               2837.8970  2019-06-04        8.0044  \n",
       "3601               2555.0896  2019-06-04        8.8014  \n",
       "3602               3073.7253  2019-06-04       11.8190  \n",
       "3603               2157.5955  2019-06-04       17.2600  \n",
       "3604               3212.0393  2019-06-04       16.2283  \n",
       "3605               3189.7771  2019-06-04        5.9582  \n",
       "3606               3366.5479  2019-06-04        6.0554  \n",
       "3607               3083.8242  2019-06-04        8.4787  \n",
       "3608               3765.0227  2019-06-04       28.7664  \n",
       "3609               3872.0000  2019-06-04       17.1245  \n",
       "3610                 89.0902  2019-06-04       28.9675  \n",
       "3611               2366.8271  2019-06-04        6.0818  \n",
       "3612               5188.7871  2019-06-04       10.4205  \n",
       "3613               5422.4473  2019-06-04       64.5909  \n",
       "3614               7020.0298  2019-06-04       10.6533  \n",
       "3615               7798.3242  2019-06-04        6.0484  \n",
       "3616              10995.4990  2019-06-04       31.2340  \n",
       "3617              11496.4678  2019-06-04       24.7114  \n",
       "3618              11027.0732  2019-06-04        6.4721  \n",
       "3619               8446.2285  2019-06-04       13.2706  \n",
       "3620                679.2310  2019-06-04        6.9509  \n",
       "3621              15448.7803  2019-06-04        6.8605  \n",
       "\n",
       "[3622 rows x 13 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list_stocks_code = df_stocks_info.index.tolist()\n",
    "df = get_fundamentals(query(valuation).filter(\n",
    "        # 这里不能使用 in 操作, 要使用in_()函数\n",
    "        valuation.code.in_(list_stocks_code)\n",
    "    ), date='2019-06-05')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "#data = pd.read_csv(r\"C:\\quanttime\\data\\finance\\valuation\\601318.XSHG.csv\")\n",
    "#data.columns = ['Unnamed: 0', 'id', 'day', 'code', 'pe_ratio', 'turnover_ratio','pb_ratio', 'ps_ratio', 'pcf_ratio', \n",
    "#                'capitalization', 'market_cap', 'circulating_cap', 'circulating_market_cap', 'pe_ratio_lyr']\n",
    "df_tmp = pd.DataFrame(data=[df.iloc[3619].values],index=pd.Index([df.index[-1]]),columns=df.columns)\n",
    "record_columns = ['id', 'day', 'code', 'pe_ratio', 'turnover_ratio','pb_ratio', 'ps_ratio', 'pcf_ratio', \n",
    "                'capitalization', 'market_cap', 'circulating_cap', 'circulating_market_cap', 'pe_ratio_lyr']\n",
    "df_tmp = df_tmp[record_columns]\n",
    "df_tmp.to_csv(r\"C:\\quanttime\\data\\finance\\valuation\\601318.XSHG.csv\",mode='a', header=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda3\\lib\\site-packages\\jqdatasdk\\api.py:107: FutureWarning: \n",
      "Panel is deprecated and will be removed in a future version.\n",
      "The recommended way to represent these types of 3-dimensional data are with a MultiIndex on a DataFrame, via the Panel.to_frame() method\n",
      "Alternatively, you can use the xarray package http://xarray.pydata.org/en/stable/.\n",
      "Pandas provides a `.to_xarray()` method to help automate this conversion.\n",
      "\n",
      "  pan = df3.to_panel()\n"
     ]
    }
   ],
   "source": [
    "q = query(valuation).filter(valuation.code == \"002932.XSHE\")\n",
    "df_valuation = get_fundamentals_continuously(q,end_date=\"2019-06-05\",count=200).to_frame()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda3\\lib\\site-packages\\ipykernel_launcher.py:2: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy\n",
      "  \n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>Unname:1</th>\n",
       "      <th>id</th>\n",
       "      <th>day.1</th>\n",
       "      <th>code.1</th>\n",
       "      <th>pe_ratio</th>\n",
       "      <th>turnover_ratio</th>\n",
       "      <th>pb_ratio</th>\n",
       "      <th>ps_ratio</th>\n",
       "      <th>pcf_ratio</th>\n",
       "      <th>capitalization</th>\n",
       "      <th>market_cap</th>\n",
       "      <th>circulating_cap</th>\n",
       "      <th>circulating_market_cap</th>\n",
       "      <th>pe_ratio_lyr</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>day</th>\n",
       "      <th>code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2018-08-07</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>17952969</td>\n",
       "      <td>2018-08-07</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>93.2805</td>\n",
       "      <td>43.6200</td>\n",
       "      <td>10.7776</td>\n",
       "      <td>36.9977</td>\n",
       "      <td>169.3471</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>61.0919</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>15.2730</td>\n",
       "      <td>93.2805</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-08</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>17966488</td>\n",
       "      <td>2018-08-08</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>83.9575</td>\n",
       "      <td>48.7828</td>\n",
       "      <td>9.7004</td>\n",
       "      <td>33.3000</td>\n",
       "      <td>152.4217</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>54.9860</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>13.7465</td>\n",
       "      <td>83.9575</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-09</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>17977019</td>\n",
       "      <td>2018-08-09</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>82.3512</td>\n",
       "      <td>40.1742</td>\n",
       "      <td>9.5148</td>\n",
       "      <td>32.6628</td>\n",
       "      <td>149.5054</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>53.9340</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>13.4835</td>\n",
       "      <td>82.3512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-10</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>17990532</td>\n",
       "      <td>2018-08-10</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>82.1478</td>\n",
       "      <td>33.6488</td>\n",
       "      <td>9.4913</td>\n",
       "      <td>32.5822</td>\n",
       "      <td>149.1362</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>53.8008</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>13.4502</td>\n",
       "      <td>82.1478</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-13</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18002308</td>\n",
       "      <td>2018-08-13</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>82.7375</td>\n",
       "      <td>27.7334</td>\n",
       "      <td>9.5594</td>\n",
       "      <td>32.8161</td>\n",
       "      <td>150.2068</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>54.1870</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>13.5467</td>\n",
       "      <td>82.7375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-14</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18015836</td>\n",
       "      <td>2018-08-14</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>84.7505</td>\n",
       "      <td>40.9133</td>\n",
       "      <td>9.7920</td>\n",
       "      <td>33.6145</td>\n",
       "      <td>153.8613</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>55.5054</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>13.8763</td>\n",
       "      <td>84.7505</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-15</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18028907</td>\n",
       "      <td>2018-08-15</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>81.0092</td>\n",
       "      <td>36.8602</td>\n",
       "      <td>9.3598</td>\n",
       "      <td>32.1306</td>\n",
       "      <td>147.0690</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>53.0550</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>13.2638</td>\n",
       "      <td>81.0092</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-16</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18042440</td>\n",
       "      <td>2018-08-16</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>76.2308</td>\n",
       "      <td>31.6527</td>\n",
       "      <td>8.8077</td>\n",
       "      <td>30.2353</td>\n",
       "      <td>138.3940</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>49.9255</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>12.4814</td>\n",
       "      <td>76.2308</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-17</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18055967</td>\n",
       "      <td>2018-08-17</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>74.2686</td>\n",
       "      <td>32.9253</td>\n",
       "      <td>8.5809</td>\n",
       "      <td>29.4570</td>\n",
       "      <td>134.8317</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>48.6404</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>12.1601</td>\n",
       "      <td>74.2686</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-20</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18069494</td>\n",
       "      <td>2018-08-20</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>75.9461</td>\n",
       "      <td>26.2076</td>\n",
       "      <td>8.7748</td>\n",
       "      <td>30.1224</td>\n",
       "      <td>137.8772</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>49.7391</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>12.4348</td>\n",
       "      <td>75.9461</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-21</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18073030</td>\n",
       "      <td>2018-08-21</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>74.5227</td>\n",
       "      <td>27.5409</td>\n",
       "      <td>8.6103</td>\n",
       "      <td>29.5579</td>\n",
       "      <td>135.2931</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>48.8069</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>12.2017</td>\n",
       "      <td>74.5227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-22</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18086566</td>\n",
       "      <td>2018-08-22</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>69.9172</td>\n",
       "      <td>29.9225</td>\n",
       "      <td>8.0782</td>\n",
       "      <td>27.7312</td>\n",
       "      <td>126.9319</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>45.7906</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.4477</td>\n",
       "      <td>69.9172</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-23</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18097972</td>\n",
       "      <td>2018-08-23</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>71.2490</td>\n",
       "      <td>26.4107</td>\n",
       "      <td>8.2321</td>\n",
       "      <td>28.2594</td>\n",
       "      <td>129.3498</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>46.6629</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.6657</td>\n",
       "      <td>71.2490</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-24</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18111510</td>\n",
       "      <td>2018-08-24</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>69.9477</td>\n",
       "      <td>25.6979</td>\n",
       "      <td>8.0817</td>\n",
       "      <td>27.7432</td>\n",
       "      <td>126.9873</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>45.8106</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.4526</td>\n",
       "      <td>69.9477</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-27</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18125055</td>\n",
       "      <td>2018-08-27</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>73.3942</td>\n",
       "      <td>30.1018</td>\n",
       "      <td>8.4799</td>\n",
       "      <td>29.1102</td>\n",
       "      <td>133.2444</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>48.0678</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>12.0170</td>\n",
       "      <td>73.3942</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-28</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18138677</td>\n",
       "      <td>2018-08-28</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>67.4506</td>\n",
       "      <td>23.5029</td>\n",
       "      <td>7.9864</td>\n",
       "      <td>26.3978</td>\n",
       "      <td>146.8284</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>47.2755</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.8189</td>\n",
       "      <td>72.1844</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-29</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18155752</td>\n",
       "      <td>2018-08-29</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>67.8496</td>\n",
       "      <td>30.8156</td>\n",
       "      <td>8.0336</td>\n",
       "      <td>26.5540</td>\n",
       "      <td>147.6970</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>47.5551</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.8888</td>\n",
       "      <td>72.6114</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-30</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18175810</td>\n",
       "      <td>2018-08-30</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>65.2465</td>\n",
       "      <td>23.4349</td>\n",
       "      <td>7.7254</td>\n",
       "      <td>25.5353</td>\n",
       "      <td>142.0306</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>45.7307</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.4327</td>\n",
       "      <td>69.8257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-31</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18198854</td>\n",
       "      <td>2018-08-31</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>65.7405</td>\n",
       "      <td>25.6089</td>\n",
       "      <td>7.7839</td>\n",
       "      <td>25.7286</td>\n",
       "      <td>143.1060</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>46.0769</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.5192</td>\n",
       "      <td>70.3543</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-03</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18221781</td>\n",
       "      <td>2018-09-03</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>62.9855</td>\n",
       "      <td>26.5837</td>\n",
       "      <td>7.4577</td>\n",
       "      <td>24.6504</td>\n",
       "      <td>137.1088</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>44.1460</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.0365</td>\n",
       "      <td>67.4060</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-04</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18244886</td>\n",
       "      <td>2018-09-04</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>62.4250</td>\n",
       "      <td>18.1099</td>\n",
       "      <td>7.3914</td>\n",
       "      <td>24.4310</td>\n",
       "      <td>135.8887</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>43.7531</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.9383</td>\n",
       "      <td>66.8061</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-05</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18267967</td>\n",
       "      <td>2018-09-05</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>60.6390</td>\n",
       "      <td>19.4605</td>\n",
       "      <td>7.1799</td>\n",
       "      <td>23.7320</td>\n",
       "      <td>132.0008</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>42.5013</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.6253</td>\n",
       "      <td>64.8948</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-06</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18291071</td>\n",
       "      <td>2018-09-06</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>61.7315</td>\n",
       "      <td>20.9917</td>\n",
       "      <td>7.3092</td>\n",
       "      <td>24.1596</td>\n",
       "      <td>134.3790</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>43.2670</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.8168</td>\n",
       "      <td>66.0639</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-07</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18304649</td>\n",
       "      <td>2018-09-07</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>60.6295</td>\n",
       "      <td>20.8530</td>\n",
       "      <td>7.1788</td>\n",
       "      <td>23.7283</td>\n",
       "      <td>131.9801</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>42.4946</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.6237</td>\n",
       "      <td>64.8846</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-10</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18327728</td>\n",
       "      <td>2018-09-10</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>60.7625</td>\n",
       "      <td>17.8676</td>\n",
       "      <td>7.1945</td>\n",
       "      <td>23.7804</td>\n",
       "      <td>132.2697</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>42.5879</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.6470</td>\n",
       "      <td>65.0269</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-11</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18350815</td>\n",
       "      <td>2018-09-11</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>61.4275</td>\n",
       "      <td>15.9611</td>\n",
       "      <td>7.2732</td>\n",
       "      <td>24.0406</td>\n",
       "      <td>133.7173</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>43.0540</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.7635</td>\n",
       "      <td>65.7386</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-12</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18373901</td>\n",
       "      <td>2018-09-12</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>63.8215</td>\n",
       "      <td>33.1393</td>\n",
       "      <td>7.5567</td>\n",
       "      <td>24.9776</td>\n",
       "      <td>138.9286</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>44.7319</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.1830</td>\n",
       "      <td>68.3006</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-13</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18401313</td>\n",
       "      <td>2018-09-13</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>64.8475</td>\n",
       "      <td>26.2705</td>\n",
       "      <td>7.6782</td>\n",
       "      <td>25.3791</td>\n",
       "      <td>141.1621</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>45.4510</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>11.3628</td>\n",
       "      <td>69.3987</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-14</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18432853</td>\n",
       "      <td>2018-09-14</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>58.3590</td>\n",
       "      <td>26.2818</td>\n",
       "      <td>6.9099</td>\n",
       "      <td>22.8397</td>\n",
       "      <td>127.0376</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>40.9033</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>10.2258</td>\n",
       "      <td>62.4547</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-17</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>18458223</td>\n",
       "      <td>2018-09-17</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>55.4995</td>\n",
       "      <td>15.8888</td>\n",
       "      <td>6.5713</td>\n",
       "      <td>21.7206</td>\n",
       "      <td>120.8129</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>38.8990</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>9.7248</td>\n",
       "      <td>59.3945</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-22</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34641475</td>\n",
       "      <td>2019-04-22</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>51.0848</td>\n",
       "      <td>4.4220</td>\n",
       "      <td>5.3007</td>\n",
       "      <td>17.5860</td>\n",
       "      <td>21.3336</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>31.1618</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.7905</td>\n",
       "      <td>47.5807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-23</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34670648</td>\n",
       "      <td>2019-04-23</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>50.9429</td>\n",
       "      <td>3.2626</td>\n",
       "      <td>5.2859</td>\n",
       "      <td>17.5371</td>\n",
       "      <td>21.2743</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>31.0753</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.7688</td>\n",
       "      <td>47.4485</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-24</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34696710</td>\n",
       "      <td>2019-04-24</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>51.8161</td>\n",
       "      <td>3.6872</td>\n",
       "      <td>5.3741</td>\n",
       "      <td>17.8377</td>\n",
       "      <td>21.6390</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>31.6080</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.9020</td>\n",
       "      <td>48.2619</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-25</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34725877</td>\n",
       "      <td>2019-04-25</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>45.6564</td>\n",
       "      <td>9.3342</td>\n",
       "      <td>4.8276</td>\n",
       "      <td>15.7136</td>\n",
       "      <td>11.1563</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>29.1710</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.2927</td>\n",
       "      <td>47.4943</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-26</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34755062</td>\n",
       "      <td>2019-04-26</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>44.6039</td>\n",
       "      <td>4.8835</td>\n",
       "      <td>4.7163</td>\n",
       "      <td>15.3513</td>\n",
       "      <td>10.8991</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>28.4984</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.1246</td>\n",
       "      <td>46.3994</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-29</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34838979</td>\n",
       "      <td>2019-04-29</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>43.8744</td>\n",
       "      <td>4.1990</td>\n",
       "      <td>4.6392</td>\n",
       "      <td>15.1002</td>\n",
       "      <td>10.7208</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>28.0323</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.0081</td>\n",
       "      <td>45.6405</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-30</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>34868150</td>\n",
       "      <td>2019-04-30</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>44.2704</td>\n",
       "      <td>2.2678</td>\n",
       "      <td>4.6810</td>\n",
       "      <td>15.2365</td>\n",
       "      <td>10.8176</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>28.2854</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.0713</td>\n",
       "      <td>46.0525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-06</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35041053</td>\n",
       "      <td>2019-05-06</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>40.1226</td>\n",
       "      <td>4.6317</td>\n",
       "      <td>4.2425</td>\n",
       "      <td>13.8090</td>\n",
       "      <td>9.8041</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>25.6353</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.4088</td>\n",
       "      <td>41.7378</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-07</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35070220</td>\n",
       "      <td>2019-05-07</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>40.8105</td>\n",
       "      <td>2.9520</td>\n",
       "      <td>4.3152</td>\n",
       "      <td>14.0457</td>\n",
       "      <td>9.9721</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.0747</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.5187</td>\n",
       "      <td>42.4533</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-08</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35099369</td>\n",
       "      <td>2019-05-08</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.0606</td>\n",
       "      <td>3.3105</td>\n",
       "      <td>4.3416</td>\n",
       "      <td>14.1318</td>\n",
       "      <td>10.0332</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.2345</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.5586</td>\n",
       "      <td>42.7135</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-09</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35125389</td>\n",
       "      <td>2019-05-09</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>40.6750</td>\n",
       "      <td>2.4832</td>\n",
       "      <td>4.3009</td>\n",
       "      <td>13.9991</td>\n",
       "      <td>9.9390</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>25.9882</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.4970</td>\n",
       "      <td>42.3123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-10</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35151415</td>\n",
       "      <td>2019-05-10</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.6963</td>\n",
       "      <td>3.9147</td>\n",
       "      <td>4.4089</td>\n",
       "      <td>14.3506</td>\n",
       "      <td>10.1886</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.6407</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.6602</td>\n",
       "      <td>43.3748</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-13</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35203992</td>\n",
       "      <td>2019-05-13</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.6129</td>\n",
       "      <td>2.8316</td>\n",
       "      <td>4.4000</td>\n",
       "      <td>14.3219</td>\n",
       "      <td>10.1682</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.5874</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.6469</td>\n",
       "      <td>43.2880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-14</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35217487</td>\n",
       "      <td>2019-05-14</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.0293</td>\n",
       "      <td>1.8244</td>\n",
       "      <td>4.3383</td>\n",
       "      <td>14.1210</td>\n",
       "      <td>10.0256</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.2146</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.5536</td>\n",
       "      <td>42.6809</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-15</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35230981</td>\n",
       "      <td>2019-05-15</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.9985</td>\n",
       "      <td>3.0437</td>\n",
       "      <td>4.4408</td>\n",
       "      <td>14.4546</td>\n",
       "      <td>10.2624</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.8338</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.7085</td>\n",
       "      <td>43.6891</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-16</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35244480</td>\n",
       "      <td>2019-05-16</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>42.2799</td>\n",
       "      <td>2.7313</td>\n",
       "      <td>4.4706</td>\n",
       "      <td>14.5515</td>\n",
       "      <td>10.3312</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>27.0136</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.7534</td>\n",
       "      <td>43.9818</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-17</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35273661</td>\n",
       "      <td>2019-05-17</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>40.3832</td>\n",
       "      <td>3.4080</td>\n",
       "      <td>4.2700</td>\n",
       "      <td>13.8987</td>\n",
       "      <td>9.8677</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>25.8017</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.4504</td>\n",
       "      <td>42.0088</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-20</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35357658</td>\n",
       "      <td>2019-05-20</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>40.8521</td>\n",
       "      <td>2.7141</td>\n",
       "      <td>4.3196</td>\n",
       "      <td>14.0601</td>\n",
       "      <td>9.9823</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.1014</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.5253</td>\n",
       "      <td>42.4966</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-21</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35386840</td>\n",
       "      <td>2019-05-21</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.4462</td>\n",
       "      <td>2.5267</td>\n",
       "      <td>4.3824</td>\n",
       "      <td>14.2645</td>\n",
       "      <td>10.1275</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.4809</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.6202</td>\n",
       "      <td>43.1146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-22</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35412907</td>\n",
       "      <td>2019-05-22</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.6129</td>\n",
       "      <td>2.5015</td>\n",
       "      <td>4.4000</td>\n",
       "      <td>14.3219</td>\n",
       "      <td>10.1682</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.5874</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.6469</td>\n",
       "      <td>43.2880</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-23</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35442150</td>\n",
       "      <td>2019-05-23</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>40.9251</td>\n",
       "      <td>2.5838</td>\n",
       "      <td>4.3273</td>\n",
       "      <td>14.0852</td>\n",
       "      <td>10.0001</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.1480</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.5370</td>\n",
       "      <td>42.5725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-24</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35471411</td>\n",
       "      <td>2019-05-24</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>41.8734</td>\n",
       "      <td>4.4905</td>\n",
       "      <td>4.5790</td>\n",
       "      <td>14.4116</td>\n",
       "      <td>10.2319</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>26.7539</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.6885</td>\n",
       "      <td>43.5590</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-27</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35552390</td>\n",
       "      <td>2019-05-27</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>43.4679</td>\n",
       "      <td>7.2401</td>\n",
       "      <td>4.7533</td>\n",
       "      <td>14.9603</td>\n",
       "      <td>10.6215</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>27.7727</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.9432</td>\n",
       "      <td>45.2177</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-28</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35581664</td>\n",
       "      <td>2019-05-28</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>42.9364</td>\n",
       "      <td>4.6293</td>\n",
       "      <td>4.6952</td>\n",
       "      <td>14.7774</td>\n",
       "      <td>10.4916</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>27.4331</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.8583</td>\n",
       "      <td>44.6648</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-29</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35610967</td>\n",
       "      <td>2019-05-29</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>43.4575</td>\n",
       "      <td>4.7146</td>\n",
       "      <td>4.7522</td>\n",
       "      <td>14.9568</td>\n",
       "      <td>10.6189</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>27.7660</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>6.9415</td>\n",
       "      <td>45.2069</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-30</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35630343</td>\n",
       "      <td>2019-05-30</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>45.8336</td>\n",
       "      <td>11.7880</td>\n",
       "      <td>5.0120</td>\n",
       "      <td>15.7745</td>\n",
       "      <td>11.1995</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>29.2841</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.3210</td>\n",
       "      <td>47.6786</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-31</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35659669</td>\n",
       "      <td>2019-05-31</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>47.6469</td>\n",
       "      <td>15.5373</td>\n",
       "      <td>5.2103</td>\n",
       "      <td>16.3986</td>\n",
       "      <td>11.6426</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>30.4427</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.6107</td>\n",
       "      <td>49.5649</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-03</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35747186</td>\n",
       "      <td>2019-06-03</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>46.3755</td>\n",
       "      <td>10.6270</td>\n",
       "      <td>5.0713</td>\n",
       "      <td>15.9610</td>\n",
       "      <td>11.3320</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>29.6304</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.4076</td>\n",
       "      <td>48.2423</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-04</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35776512</td>\n",
       "      <td>2019-06-04</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>45.8857</td>\n",
       "      <td>5.7170</td>\n",
       "      <td>5.0177</td>\n",
       "      <td>15.7925</td>\n",
       "      <td>11.2123</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>29.3174</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.3294</td>\n",
       "      <td>47.7328</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-05</th>\n",
       "      <th>002932.XSHE</th>\n",
       "      <td>0</td>\n",
       "      <td>35805830</td>\n",
       "      <td>2019-06-05</td>\n",
       "      <td>002932.XSHE</td>\n",
       "      <td>44.8123</td>\n",
       "      <td>5.1964</td>\n",
       "      <td>4.9003</td>\n",
       "      <td>15.4230</td>\n",
       "      <td>10.9500</td>\n",
       "      <td>6658.5146</td>\n",
       "      <td>28.6316</td>\n",
       "      <td>1664.6287</td>\n",
       "      <td>7.1579</td>\n",
       "      <td>46.6162</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>200 rows × 14 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                        Unname:1        id       day.1       code.1  pe_ratio  \\\n",
       "day        code                                                                 \n",
       "2018-08-07 002932.XSHE         0  17952969  2018-08-07  002932.XSHE   93.2805   \n",
       "2018-08-08 002932.XSHE         0  17966488  2018-08-08  002932.XSHE   83.9575   \n",
       "2018-08-09 002932.XSHE         0  17977019  2018-08-09  002932.XSHE   82.3512   \n",
       "2018-08-10 002932.XSHE         0  17990532  2018-08-10  002932.XSHE   82.1478   \n",
       "2018-08-13 002932.XSHE         0  18002308  2018-08-13  002932.XSHE   82.7375   \n",
       "2018-08-14 002932.XSHE         0  18015836  2018-08-14  002932.XSHE   84.7505   \n",
       "2018-08-15 002932.XSHE         0  18028907  2018-08-15  002932.XSHE   81.0092   \n",
       "2018-08-16 002932.XSHE         0  18042440  2018-08-16  002932.XSHE   76.2308   \n",
       "2018-08-17 002932.XSHE         0  18055967  2018-08-17  002932.XSHE   74.2686   \n",
       "2018-08-20 002932.XSHE         0  18069494  2018-08-20  002932.XSHE   75.9461   \n",
       "2018-08-21 002932.XSHE         0  18073030  2018-08-21  002932.XSHE   74.5227   \n",
       "2018-08-22 002932.XSHE         0  18086566  2018-08-22  002932.XSHE   69.9172   \n",
       "2018-08-23 002932.XSHE         0  18097972  2018-08-23  002932.XSHE   71.2490   \n",
       "2018-08-24 002932.XSHE         0  18111510  2018-08-24  002932.XSHE   69.9477   \n",
       "2018-08-27 002932.XSHE         0  18125055  2018-08-27  002932.XSHE   73.3942   \n",
       "2018-08-28 002932.XSHE         0  18138677  2018-08-28  002932.XSHE   67.4506   \n",
       "2018-08-29 002932.XSHE         0  18155752  2018-08-29  002932.XSHE   67.8496   \n",
       "2018-08-30 002932.XSHE         0  18175810  2018-08-30  002932.XSHE   65.2465   \n",
       "2018-08-31 002932.XSHE         0  18198854  2018-08-31  002932.XSHE   65.7405   \n",
       "2018-09-03 002932.XSHE         0  18221781  2018-09-03  002932.XSHE   62.9855   \n",
       "2018-09-04 002932.XSHE         0  18244886  2018-09-04  002932.XSHE   62.4250   \n",
       "2018-09-05 002932.XSHE         0  18267967  2018-09-05  002932.XSHE   60.6390   \n",
       "2018-09-06 002932.XSHE         0  18291071  2018-09-06  002932.XSHE   61.7315   \n",
       "2018-09-07 002932.XSHE         0  18304649  2018-09-07  002932.XSHE   60.6295   \n",
       "2018-09-10 002932.XSHE         0  18327728  2018-09-10  002932.XSHE   60.7625   \n",
       "2018-09-11 002932.XSHE         0  18350815  2018-09-11  002932.XSHE   61.4275   \n",
       "2018-09-12 002932.XSHE         0  18373901  2018-09-12  002932.XSHE   63.8215   \n",
       "2018-09-13 002932.XSHE         0  18401313  2018-09-13  002932.XSHE   64.8475   \n",
       "2018-09-14 002932.XSHE         0  18432853  2018-09-14  002932.XSHE   58.3590   \n",
       "2018-09-17 002932.XSHE         0  18458223  2018-09-17  002932.XSHE   55.4995   \n",
       "...                          ...       ...         ...          ...       ...   \n",
       "2019-04-22 002932.XSHE         0  34641475  2019-04-22  002932.XSHE   51.0848   \n",
       "2019-04-23 002932.XSHE         0  34670648  2019-04-23  002932.XSHE   50.9429   \n",
       "2019-04-24 002932.XSHE         0  34696710  2019-04-24  002932.XSHE   51.8161   \n",
       "2019-04-25 002932.XSHE         0  34725877  2019-04-25  002932.XSHE   45.6564   \n",
       "2019-04-26 002932.XSHE         0  34755062  2019-04-26  002932.XSHE   44.6039   \n",
       "2019-04-29 002932.XSHE         0  34838979  2019-04-29  002932.XSHE   43.8744   \n",
       "2019-04-30 002932.XSHE         0  34868150  2019-04-30  002932.XSHE   44.2704   \n",
       "2019-05-06 002932.XSHE         0  35041053  2019-05-06  002932.XSHE   40.1226   \n",
       "2019-05-07 002932.XSHE         0  35070220  2019-05-07  002932.XSHE   40.8105   \n",
       "2019-05-08 002932.XSHE         0  35099369  2019-05-08  002932.XSHE   41.0606   \n",
       "2019-05-09 002932.XSHE         0  35125389  2019-05-09  002932.XSHE   40.6750   \n",
       "2019-05-10 002932.XSHE         0  35151415  2019-05-10  002932.XSHE   41.6963   \n",
       "2019-05-13 002932.XSHE         0  35203992  2019-05-13  002932.XSHE   41.6129   \n",
       "2019-05-14 002932.XSHE         0  35217487  2019-05-14  002932.XSHE   41.0293   \n",
       "2019-05-15 002932.XSHE         0  35230981  2019-05-15  002932.XSHE   41.9985   \n",
       "2019-05-16 002932.XSHE         0  35244480  2019-05-16  002932.XSHE   42.2799   \n",
       "2019-05-17 002932.XSHE         0  35273661  2019-05-17  002932.XSHE   40.3832   \n",
       "2019-05-20 002932.XSHE         0  35357658  2019-05-20  002932.XSHE   40.8521   \n",
       "2019-05-21 002932.XSHE         0  35386840  2019-05-21  002932.XSHE   41.4462   \n",
       "2019-05-22 002932.XSHE         0  35412907  2019-05-22  002932.XSHE   41.6129   \n",
       "2019-05-23 002932.XSHE         0  35442150  2019-05-23  002932.XSHE   40.9251   \n",
       "2019-05-24 002932.XSHE         0  35471411  2019-05-24  002932.XSHE   41.8734   \n",
       "2019-05-27 002932.XSHE         0  35552390  2019-05-27  002932.XSHE   43.4679   \n",
       "2019-05-28 002932.XSHE         0  35581664  2019-05-28  002932.XSHE   42.9364   \n",
       "2019-05-29 002932.XSHE         0  35610967  2019-05-29  002932.XSHE   43.4575   \n",
       "2019-05-30 002932.XSHE         0  35630343  2019-05-30  002932.XSHE   45.8336   \n",
       "2019-05-31 002932.XSHE         0  35659669  2019-05-31  002932.XSHE   47.6469   \n",
       "2019-06-03 002932.XSHE         0  35747186  2019-06-03  002932.XSHE   46.3755   \n",
       "2019-06-04 002932.XSHE         0  35776512  2019-06-04  002932.XSHE   45.8857   \n",
       "2019-06-05 002932.XSHE         0  35805830  2019-06-05  002932.XSHE   44.8123   \n",
       "\n",
       "                        turnover_ratio  pb_ratio  ps_ratio  pcf_ratio  \\\n",
       "day        code                                                         \n",
       "2018-08-07 002932.XSHE         43.6200   10.7776   36.9977   169.3471   \n",
       "2018-08-08 002932.XSHE         48.7828    9.7004   33.3000   152.4217   \n",
       "2018-08-09 002932.XSHE         40.1742    9.5148   32.6628   149.5054   \n",
       "2018-08-10 002932.XSHE         33.6488    9.4913   32.5822   149.1362   \n",
       "2018-08-13 002932.XSHE         27.7334    9.5594   32.8161   150.2068   \n",
       "2018-08-14 002932.XSHE         40.9133    9.7920   33.6145   153.8613   \n",
       "2018-08-15 002932.XSHE         36.8602    9.3598   32.1306   147.0690   \n",
       "2018-08-16 002932.XSHE         31.6527    8.8077   30.2353   138.3940   \n",
       "2018-08-17 002932.XSHE         32.9253    8.5809   29.4570   134.8317   \n",
       "2018-08-20 002932.XSHE         26.2076    8.7748   30.1224   137.8772   \n",
       "2018-08-21 002932.XSHE         27.5409    8.6103   29.5579   135.2931   \n",
       "2018-08-22 002932.XSHE         29.9225    8.0782   27.7312   126.9319   \n",
       "2018-08-23 002932.XSHE         26.4107    8.2321   28.2594   129.3498   \n",
       "2018-08-24 002932.XSHE         25.6979    8.0817   27.7432   126.9873   \n",
       "2018-08-27 002932.XSHE         30.1018    8.4799   29.1102   133.2444   \n",
       "2018-08-28 002932.XSHE         23.5029    7.9864   26.3978   146.8284   \n",
       "2018-08-29 002932.XSHE         30.8156    8.0336   26.5540   147.6970   \n",
       "2018-08-30 002932.XSHE         23.4349    7.7254   25.5353   142.0306   \n",
       "2018-08-31 002932.XSHE         25.6089    7.7839   25.7286   143.1060   \n",
       "2018-09-03 002932.XSHE         26.5837    7.4577   24.6504   137.1088   \n",
       "2018-09-04 002932.XSHE         18.1099    7.3914   24.4310   135.8887   \n",
       "2018-09-05 002932.XSHE         19.4605    7.1799   23.7320   132.0008   \n",
       "2018-09-06 002932.XSHE         20.9917    7.3092   24.1596   134.3790   \n",
       "2018-09-07 002932.XSHE         20.8530    7.1788   23.7283   131.9801   \n",
       "2018-09-10 002932.XSHE         17.8676    7.1945   23.7804   132.2697   \n",
       "2018-09-11 002932.XSHE         15.9611    7.2732   24.0406   133.7173   \n",
       "2018-09-12 002932.XSHE         33.1393    7.5567   24.9776   138.9286   \n",
       "2018-09-13 002932.XSHE         26.2705    7.6782   25.3791   141.1621   \n",
       "2018-09-14 002932.XSHE         26.2818    6.9099   22.8397   127.0376   \n",
       "2018-09-17 002932.XSHE         15.8888    6.5713   21.7206   120.8129   \n",
       "...                                ...       ...       ...        ...   \n",
       "2019-04-22 002932.XSHE          4.4220    5.3007   17.5860    21.3336   \n",
       "2019-04-23 002932.XSHE          3.2626    5.2859   17.5371    21.2743   \n",
       "2019-04-24 002932.XSHE          3.6872    5.3741   17.8377    21.6390   \n",
       "2019-04-25 002932.XSHE          9.3342    4.8276   15.7136    11.1563   \n",
       "2019-04-26 002932.XSHE          4.8835    4.7163   15.3513    10.8991   \n",
       "2019-04-29 002932.XSHE          4.1990    4.6392   15.1002    10.7208   \n",
       "2019-04-30 002932.XSHE          2.2678    4.6810   15.2365    10.8176   \n",
       "2019-05-06 002932.XSHE          4.6317    4.2425   13.8090     9.8041   \n",
       "2019-05-07 002932.XSHE          2.9520    4.3152   14.0457     9.9721   \n",
       "2019-05-08 002932.XSHE          3.3105    4.3416   14.1318    10.0332   \n",
       "2019-05-09 002932.XSHE          2.4832    4.3009   13.9991     9.9390   \n",
       "2019-05-10 002932.XSHE          3.9147    4.4089   14.3506    10.1886   \n",
       "2019-05-13 002932.XSHE          2.8316    4.4000   14.3219    10.1682   \n",
       "2019-05-14 002932.XSHE          1.8244    4.3383   14.1210    10.0256   \n",
       "2019-05-15 002932.XSHE          3.0437    4.4408   14.4546    10.2624   \n",
       "2019-05-16 002932.XSHE          2.7313    4.4706   14.5515    10.3312   \n",
       "2019-05-17 002932.XSHE          3.4080    4.2700   13.8987     9.8677   \n",
       "2019-05-20 002932.XSHE          2.7141    4.3196   14.0601     9.9823   \n",
       "2019-05-21 002932.XSHE          2.5267    4.3824   14.2645    10.1275   \n",
       "2019-05-22 002932.XSHE          2.5015    4.4000   14.3219    10.1682   \n",
       "2019-05-23 002932.XSHE          2.5838    4.3273   14.0852    10.0001   \n",
       "2019-05-24 002932.XSHE          4.4905    4.5790   14.4116    10.2319   \n",
       "2019-05-27 002932.XSHE          7.2401    4.7533   14.9603    10.6215   \n",
       "2019-05-28 002932.XSHE          4.6293    4.6952   14.7774    10.4916   \n",
       "2019-05-29 002932.XSHE          4.7146    4.7522   14.9568    10.6189   \n",
       "2019-05-30 002932.XSHE         11.7880    5.0120   15.7745    11.1995   \n",
       "2019-05-31 002932.XSHE         15.5373    5.2103   16.3986    11.6426   \n",
       "2019-06-03 002932.XSHE         10.6270    5.0713   15.9610    11.3320   \n",
       "2019-06-04 002932.XSHE          5.7170    5.0177   15.7925    11.2123   \n",
       "2019-06-05 002932.XSHE          5.1964    4.9003   15.4230    10.9500   \n",
       "\n",
       "                        capitalization  market_cap  circulating_cap  \\\n",
       "day        code                                                       \n",
       "2018-08-07 002932.XSHE       6658.5146     61.0919        1664.6287   \n",
       "2018-08-08 002932.XSHE       6658.5146     54.9860        1664.6287   \n",
       "2018-08-09 002932.XSHE       6658.5146     53.9340        1664.6287   \n",
       "2018-08-10 002932.XSHE       6658.5146     53.8008        1664.6287   \n",
       "2018-08-13 002932.XSHE       6658.5146     54.1870        1664.6287   \n",
       "2018-08-14 002932.XSHE       6658.5146     55.5054        1664.6287   \n",
       "2018-08-15 002932.XSHE       6658.5146     53.0550        1664.6287   \n",
       "2018-08-16 002932.XSHE       6658.5146     49.9255        1664.6287   \n",
       "2018-08-17 002932.XSHE       6658.5146     48.6404        1664.6287   \n",
       "2018-08-20 002932.XSHE       6658.5146     49.7391        1664.6287   \n",
       "2018-08-21 002932.XSHE       6658.5146     48.8069        1664.6287   \n",
       "2018-08-22 002932.XSHE       6658.5146     45.7906        1664.6287   \n",
       "2018-08-23 002932.XSHE       6658.5146     46.6629        1664.6287   \n",
       "2018-08-24 002932.XSHE       6658.5146     45.8106        1664.6287   \n",
       "2018-08-27 002932.XSHE       6658.5146     48.0678        1664.6287   \n",
       "2018-08-28 002932.XSHE       6658.5146     47.2755        1664.6287   \n",
       "2018-08-29 002932.XSHE       6658.5146     47.5551        1664.6287   \n",
       "2018-08-30 002932.XSHE       6658.5146     45.7307        1664.6287   \n",
       "2018-08-31 002932.XSHE       6658.5146     46.0769        1664.6287   \n",
       "2018-09-03 002932.XSHE       6658.5146     44.1460        1664.6287   \n",
       "2018-09-04 002932.XSHE       6658.5146     43.7531        1664.6287   \n",
       "2018-09-05 002932.XSHE       6658.5146     42.5013        1664.6287   \n",
       "2018-09-06 002932.XSHE       6658.5146     43.2670        1664.6287   \n",
       "2018-09-07 002932.XSHE       6658.5146     42.4946        1664.6287   \n",
       "2018-09-10 002932.XSHE       6658.5146     42.5879        1664.6287   \n",
       "2018-09-11 002932.XSHE       6658.5146     43.0540        1664.6287   \n",
       "2018-09-12 002932.XSHE       6658.5146     44.7319        1664.6287   \n",
       "2018-09-13 002932.XSHE       6658.5146     45.4510        1664.6287   \n",
       "2018-09-14 002932.XSHE       6658.5146     40.9033        1664.6287   \n",
       "2018-09-17 002932.XSHE       6658.5146     38.8990        1664.6287   \n",
       "...                                ...         ...              ...   \n",
       "2019-04-22 002932.XSHE       6658.5146     31.1618        1664.6287   \n",
       "2019-04-23 002932.XSHE       6658.5146     31.0753        1664.6287   \n",
       "2019-04-24 002932.XSHE       6658.5146     31.6080        1664.6287   \n",
       "2019-04-25 002932.XSHE       6658.5146     29.1710        1664.6287   \n",
       "2019-04-26 002932.XSHE       6658.5146     28.4984        1664.6287   \n",
       "2019-04-29 002932.XSHE       6658.5146     28.0323        1664.6287   \n",
       "2019-04-30 002932.XSHE       6658.5146     28.2854        1664.6287   \n",
       "2019-05-06 002932.XSHE       6658.5146     25.6353        1664.6287   \n",
       "2019-05-07 002932.XSHE       6658.5146     26.0747        1664.6287   \n",
       "2019-05-08 002932.XSHE       6658.5146     26.2345        1664.6287   \n",
       "2019-05-09 002932.XSHE       6658.5146     25.9882        1664.6287   \n",
       "2019-05-10 002932.XSHE       6658.5146     26.6407        1664.6287   \n",
       "2019-05-13 002932.XSHE       6658.5146     26.5874        1664.6287   \n",
       "2019-05-14 002932.XSHE       6658.5146     26.2146        1664.6287   \n",
       "2019-05-15 002932.XSHE       6658.5146     26.8338        1664.6287   \n",
       "2019-05-16 002932.XSHE       6658.5146     27.0136        1664.6287   \n",
       "2019-05-17 002932.XSHE       6658.5146     25.8017        1664.6287   \n",
       "2019-05-20 002932.XSHE       6658.5146     26.1014        1664.6287   \n",
       "2019-05-21 002932.XSHE       6658.5146     26.4809        1664.6287   \n",
       "2019-05-22 002932.XSHE       6658.5146     26.5874        1664.6287   \n",
       "2019-05-23 002932.XSHE       6658.5146     26.1480        1664.6287   \n",
       "2019-05-24 002932.XSHE       6658.5146     26.7539        1664.6287   \n",
       "2019-05-27 002932.XSHE       6658.5146     27.7727        1664.6287   \n",
       "2019-05-28 002932.XSHE       6658.5146     27.4331        1664.6287   \n",
       "2019-05-29 002932.XSHE       6658.5146     27.7660        1664.6287   \n",
       "2019-05-30 002932.XSHE       6658.5146     29.2841        1664.6287   \n",
       "2019-05-31 002932.XSHE       6658.5146     30.4427        1664.6287   \n",
       "2019-06-03 002932.XSHE       6658.5146     29.6304        1664.6287   \n",
       "2019-06-04 002932.XSHE       6658.5146     29.3174        1664.6287   \n",
       "2019-06-05 002932.XSHE       6658.5146     28.6316        1664.6287   \n",
       "\n",
       "                        circulating_market_cap  pe_ratio_lyr  \n",
       "day        code                                               \n",
       "2018-08-07 002932.XSHE                 15.2730       93.2805  \n",
       "2018-08-08 002932.XSHE                 13.7465       83.9575  \n",
       "2018-08-09 002932.XSHE                 13.4835       82.3512  \n",
       "2018-08-10 002932.XSHE                 13.4502       82.1478  \n",
       "2018-08-13 002932.XSHE                 13.5467       82.7375  \n",
       "2018-08-14 002932.XSHE                 13.8763       84.7505  \n",
       "2018-08-15 002932.XSHE                 13.2638       81.0092  \n",
       "2018-08-16 002932.XSHE                 12.4814       76.2308  \n",
       "2018-08-17 002932.XSHE                 12.1601       74.2686  \n",
       "2018-08-20 002932.XSHE                 12.4348       75.9461  \n",
       "2018-08-21 002932.XSHE                 12.2017       74.5227  \n",
       "2018-08-22 002932.XSHE                 11.4477       69.9172  \n",
       "2018-08-23 002932.XSHE                 11.6657       71.2490  \n",
       "2018-08-24 002932.XSHE                 11.4526       69.9477  \n",
       "2018-08-27 002932.XSHE                 12.0170       73.3942  \n",
       "2018-08-28 002932.XSHE                 11.8189       72.1844  \n",
       "2018-08-29 002932.XSHE                 11.8888       72.6114  \n",
       "2018-08-30 002932.XSHE                 11.4327       69.8257  \n",
       "2018-08-31 002932.XSHE                 11.5192       70.3543  \n",
       "2018-09-03 002932.XSHE                 11.0365       67.4060  \n",
       "2018-09-04 002932.XSHE                 10.9383       66.8061  \n",
       "2018-09-05 002932.XSHE                 10.6253       64.8948  \n",
       "2018-09-06 002932.XSHE                 10.8168       66.0639  \n",
       "2018-09-07 002932.XSHE                 10.6237       64.8846  \n",
       "2018-09-10 002932.XSHE                 10.6470       65.0269  \n",
       "2018-09-11 002932.XSHE                 10.7635       65.7386  \n",
       "2018-09-12 002932.XSHE                 11.1830       68.3006  \n",
       "2018-09-13 002932.XSHE                 11.3628       69.3987  \n",
       "2018-09-14 002932.XSHE                 10.2258       62.4547  \n",
       "2018-09-17 002932.XSHE                  9.7248       59.3945  \n",
       "...                                        ...           ...  \n",
       "2019-04-22 002932.XSHE                  7.7905       47.5807  \n",
       "2019-04-23 002932.XSHE                  7.7688       47.4485  \n",
       "2019-04-24 002932.XSHE                  7.9020       48.2619  \n",
       "2019-04-25 002932.XSHE                  7.2927       47.4943  \n",
       "2019-04-26 002932.XSHE                  7.1246       46.3994  \n",
       "2019-04-29 002932.XSHE                  7.0081       45.6405  \n",
       "2019-04-30 002932.XSHE                  7.0713       46.0525  \n",
       "2019-05-06 002932.XSHE                  6.4088       41.7378  \n",
       "2019-05-07 002932.XSHE                  6.5187       42.4533  \n",
       "2019-05-08 002932.XSHE                  6.5586       42.7135  \n",
       "2019-05-09 002932.XSHE                  6.4970       42.3123  \n",
       "2019-05-10 002932.XSHE                  6.6602       43.3748  \n",
       "2019-05-13 002932.XSHE                  6.6469       43.2880  \n",
       "2019-05-14 002932.XSHE                  6.5536       42.6809  \n",
       "2019-05-15 002932.XSHE                  6.7085       43.6891  \n",
       "2019-05-16 002932.XSHE                  6.7534       43.9818  \n",
       "2019-05-17 002932.XSHE                  6.4504       42.0088  \n",
       "2019-05-20 002932.XSHE                  6.5253       42.4966  \n",
       "2019-05-21 002932.XSHE                  6.6202       43.1146  \n",
       "2019-05-22 002932.XSHE                  6.6469       43.2880  \n",
       "2019-05-23 002932.XSHE                  6.5370       42.5725  \n",
       "2019-05-24 002932.XSHE                  6.6885       43.5590  \n",
       "2019-05-27 002932.XSHE                  6.9432       45.2177  \n",
       "2019-05-28 002932.XSHE                  6.8583       44.6648  \n",
       "2019-05-29 002932.XSHE                  6.9415       45.2069  \n",
       "2019-05-30 002932.XSHE                  7.3210       47.6786  \n",
       "2019-05-31 002932.XSHE                  7.6107       49.5649  \n",
       "2019-06-03 002932.XSHE                  7.4076       48.2423  \n",
       "2019-06-04 002932.XSHE                  7.3294       47.7328  \n",
       "2019-06-05 002932.XSHE                  7.1579       46.6162  \n",
       "\n",
       "[200 rows x 14 columns]"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmp = df_valuation.loc[(\"2018-08-07\",\"002932.XSHE\"):(\"2019-06-05\",\"002932.XSHE\")]\n",
    "tmp['Unname:1']=0\n",
    "record_columns = ['Unname:1','id', 'day.1', 'code.1', 'pe_ratio', 'turnover_ratio', 'pb_ratio',\n",
    "                'ps_ratio', 'pcf_ratio', 'capitalization', 'market_cap', 'circulating_cap',\n",
    "                'circulating_market_cap','pe_ratio_lyr']\n",
    "tmp = tmp[record_columns]\n",
    "#tmp.to_csv(r'C:\\quanttime\\data\\finance\\valuation\\002932.XSHE.csv',index=False, mode='a', header=None)\n",
    "tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>display_name</th>\n",
       "      <th>name</th>\n",
       "      <th>start_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>A0501.XDCE</th>\n",
       "      <td>豆一0501</td>\n",
       "      <td>a0501</td>\n",
       "      <td>2003-07-15</td>\n",
       "      <td>2005-01-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0503.XDCE</th>\n",
       "      <td>豆一0503</td>\n",
       "      <td>a0503</td>\n",
       "      <td>2003-09-15</td>\n",
       "      <td>2005-03-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0505.XDCE</th>\n",
       "      <td>豆一0505</td>\n",
       "      <td>a0505</td>\n",
       "      <td>2003-11-17</td>\n",
       "      <td>2005-05-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0507.XDCE</th>\n",
       "      <td>豆一0507</td>\n",
       "      <td>a0507</td>\n",
       "      <td>2004-01-16</td>\n",
       "      <td>2005-07-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0509.XDCE</th>\n",
       "      <td>豆一0509</td>\n",
       "      <td>a0509</td>\n",
       "      <td>2004-03-15</td>\n",
       "      <td>2005-09-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0511.XDCE</th>\n",
       "      <td>豆一0511</td>\n",
       "      <td>a0511</td>\n",
       "      <td>2004-05-24</td>\n",
       "      <td>2005-11-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0601.XDCE</th>\n",
       "      <td>豆一0601</td>\n",
       "      <td>a0601</td>\n",
       "      <td>2004-07-15</td>\n",
       "      <td>2006-01-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0603.XDCE</th>\n",
       "      <td>豆一0603</td>\n",
       "      <td>a0603</td>\n",
       "      <td>2004-09-15</td>\n",
       "      <td>2006-03-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0605.XDCE</th>\n",
       "      <td>豆一0605</td>\n",
       "      <td>a0605</td>\n",
       "      <td>2004-11-15</td>\n",
       "      <td>2006-05-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0607.XDCE</th>\n",
       "      <td>豆一0607</td>\n",
       "      <td>a0607</td>\n",
       "      <td>2005-01-18</td>\n",
       "      <td>2006-07-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0609.XDCE</th>\n",
       "      <td>豆一0609</td>\n",
       "      <td>a0609</td>\n",
       "      <td>2005-03-15</td>\n",
       "      <td>2006-09-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0611.XDCE</th>\n",
       "      <td>豆一0611</td>\n",
       "      <td>a0611</td>\n",
       "      <td>2005-05-23</td>\n",
       "      <td>2006-11-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0701.XDCE</th>\n",
       "      <td>豆一0701</td>\n",
       "      <td>a0701</td>\n",
       "      <td>2005-07-15</td>\n",
       "      <td>2007-01-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0703.XDCE</th>\n",
       "      <td>豆一0703</td>\n",
       "      <td>a0703</td>\n",
       "      <td>2005-09-15</td>\n",
       "      <td>2007-03-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0705.XDCE</th>\n",
       "      <td>豆一0705</td>\n",
       "      <td>a0705</td>\n",
       "      <td>2005-11-15</td>\n",
       "      <td>2007-05-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0707.XDCE</th>\n",
       "      <td>豆一0707</td>\n",
       "      <td>a0707</td>\n",
       "      <td>2006-01-18</td>\n",
       "      <td>2007-07-13</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0709.XDCE</th>\n",
       "      <td>豆一0709</td>\n",
       "      <td>a0709</td>\n",
       "      <td>2006-03-15</td>\n",
       "      <td>2007-09-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0711.XDCE</th>\n",
       "      <td>豆一0711</td>\n",
       "      <td>a0711</td>\n",
       "      <td>2006-05-22</td>\n",
       "      <td>2007-11-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0801.XDCE</th>\n",
       "      <td>豆一0801</td>\n",
       "      <td>a0801</td>\n",
       "      <td>2006-07-17</td>\n",
       "      <td>2008-01-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0803.XDCE</th>\n",
       "      <td>豆一0803</td>\n",
       "      <td>a0803</td>\n",
       "      <td>2006-09-15</td>\n",
       "      <td>2008-03-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0805.XDCE</th>\n",
       "      <td>豆一0805</td>\n",
       "      <td>a0805</td>\n",
       "      <td>2006-11-15</td>\n",
       "      <td>2008-05-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0807.XDCE</th>\n",
       "      <td>豆一0807</td>\n",
       "      <td>a0807</td>\n",
       "      <td>2007-01-18</td>\n",
       "      <td>2008-07-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0809.XDCE</th>\n",
       "      <td>豆一0809</td>\n",
       "      <td>a0809</td>\n",
       "      <td>2007-03-15</td>\n",
       "      <td>2008-09-12</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0811.XDCE</th>\n",
       "      <td>豆一0811</td>\n",
       "      <td>a0811</td>\n",
       "      <td>2007-05-22</td>\n",
       "      <td>2008-11-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0901.XDCE</th>\n",
       "      <td>豆一0901</td>\n",
       "      <td>a0901</td>\n",
       "      <td>2007-07-16</td>\n",
       "      <td>2009-01-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0903.XDCE</th>\n",
       "      <td>豆一0903</td>\n",
       "      <td>a0903</td>\n",
       "      <td>2007-09-17</td>\n",
       "      <td>2009-03-13</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0905.XDCE</th>\n",
       "      <td>豆一0905</td>\n",
       "      <td>a0905</td>\n",
       "      <td>2007-11-15</td>\n",
       "      <td>2009-05-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0907.XDCE</th>\n",
       "      <td>豆一0907</td>\n",
       "      <td>a0907</td>\n",
       "      <td>2008-01-16</td>\n",
       "      <td>2009-07-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0909.XDCE</th>\n",
       "      <td>豆一0909</td>\n",
       "      <td>a0909</td>\n",
       "      <td>2008-03-17</td>\n",
       "      <td>2009-09-14</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>A0911.XDCE</th>\n",
       "      <td>豆一0911</td>\n",
       "      <td>a0911</td>\n",
       "      <td>2008-05-19</td>\n",
       "      <td>2009-11-13</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1802.XSGE</th>\n",
       "      <td>锌1802</td>\n",
       "      <td>zn1802</td>\n",
       "      <td>2017-02-16</td>\n",
       "      <td>2018-02-09</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1803.XSGE</th>\n",
       "      <td>锌1803</td>\n",
       "      <td>zn1803</td>\n",
       "      <td>2017-03-16</td>\n",
       "      <td>2018-03-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1804.XSGE</th>\n",
       "      <td>锌1804</td>\n",
       "      <td>zn1804</td>\n",
       "      <td>2017-04-18</td>\n",
       "      <td>2018-04-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1805.XSGE</th>\n",
       "      <td>锌1805</td>\n",
       "      <td>zn1805</td>\n",
       "      <td>2017-05-16</td>\n",
       "      <td>2018-05-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1806.XSGE</th>\n",
       "      <td>锌1806</td>\n",
       "      <td>zn1806</td>\n",
       "      <td>2017-06-16</td>\n",
       "      <td>2018-06-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1807.XSGE</th>\n",
       "      <td>锌1807</td>\n",
       "      <td>zn1807</td>\n",
       "      <td>2017-07-18</td>\n",
       "      <td>2018-07-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1808.XSGE</th>\n",
       "      <td>锌1808</td>\n",
       "      <td>zn1808</td>\n",
       "      <td>2017-08-16</td>\n",
       "      <td>2018-08-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1809.XSGE</th>\n",
       "      <td>锌1809</td>\n",
       "      <td>zn1809</td>\n",
       "      <td>2017-09-18</td>\n",
       "      <td>2018-09-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1810.XSGE</th>\n",
       "      <td>锌1810</td>\n",
       "      <td>zn1810</td>\n",
       "      <td>2017-10-17</td>\n",
       "      <td>2018-10-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1811.XSGE</th>\n",
       "      <td>锌1811</td>\n",
       "      <td>zn1811</td>\n",
       "      <td>2017-11-16</td>\n",
       "      <td>2018-11-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1812.XSGE</th>\n",
       "      <td>锌1812</td>\n",
       "      <td>zn1812</td>\n",
       "      <td>2017-12-18</td>\n",
       "      <td>2018-12-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1901.XSGE</th>\n",
       "      <td>锌1901</td>\n",
       "      <td>zn1901</td>\n",
       "      <td>2018-01-16</td>\n",
       "      <td>2019-01-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1902.XSGE</th>\n",
       "      <td>锌1902</td>\n",
       "      <td>zn1902</td>\n",
       "      <td>2018-02-12</td>\n",
       "      <td>2019-02-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1903.XSGE</th>\n",
       "      <td>锌1903</td>\n",
       "      <td>zn1903</td>\n",
       "      <td>2018-03-16</td>\n",
       "      <td>2019-03-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1904.XSGE</th>\n",
       "      <td>锌1904</td>\n",
       "      <td>zn1904</td>\n",
       "      <td>2018-04-17</td>\n",
       "      <td>2019-04-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1905.XSGE</th>\n",
       "      <td>锌1905</td>\n",
       "      <td>zn1905</td>\n",
       "      <td>2018-05-16</td>\n",
       "      <td>2019-05-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1906.XSGE</th>\n",
       "      <td>锌1906</td>\n",
       "      <td>zn1906</td>\n",
       "      <td>2018-06-19</td>\n",
       "      <td>2019-06-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1907.XSGE</th>\n",
       "      <td>锌1907</td>\n",
       "      <td>zn1907</td>\n",
       "      <td>2018-07-17</td>\n",
       "      <td>2019-07-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1908.XSGE</th>\n",
       "      <td>锌1908</td>\n",
       "      <td>zn1908</td>\n",
       "      <td>2018-08-16</td>\n",
       "      <td>2019-08-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1909.XSGE</th>\n",
       "      <td>锌1909</td>\n",
       "      <td>zn1909</td>\n",
       "      <td>2018-09-18</td>\n",
       "      <td>2019-09-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1910.XSGE</th>\n",
       "      <td>锌1910</td>\n",
       "      <td>zn1910</td>\n",
       "      <td>2018-10-16</td>\n",
       "      <td>2019-10-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1911.XSGE</th>\n",
       "      <td>锌1911</td>\n",
       "      <td>zn1911</td>\n",
       "      <td>2018-11-16</td>\n",
       "      <td>2019-11-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN1912.XSGE</th>\n",
       "      <td>锌1912</td>\n",
       "      <td>zn1912</td>\n",
       "      <td>2018-12-18</td>\n",
       "      <td>2019-12-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN2001.XSGE</th>\n",
       "      <td>锌2001</td>\n",
       "      <td>zn2001</td>\n",
       "      <td>2019-01-16</td>\n",
       "      <td>2020-01-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN2002.XSGE</th>\n",
       "      <td>锌2002</td>\n",
       "      <td>zn2002</td>\n",
       "      <td>2019-02-18</td>\n",
       "      <td>2020-02-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN2003.XSGE</th>\n",
       "      <td>锌2003</td>\n",
       "      <td>zn2003</td>\n",
       "      <td>2019-03-18</td>\n",
       "      <td>2020-03-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN2004.XSGE</th>\n",
       "      <td>锌2004</td>\n",
       "      <td>zn2004</td>\n",
       "      <td>2019-04-16</td>\n",
       "      <td>2020-04-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN2005.XSGE</th>\n",
       "      <td>锌2005</td>\n",
       "      <td>zn2005</td>\n",
       "      <td>2019-05-16</td>\n",
       "      <td>2020-05-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN8888.XSGE</th>\n",
       "      <td>锌期货指数</td>\n",
       "      <td>ZN8888</td>\n",
       "      <td>2007-03-26</td>\n",
       "      <td>2030-01-01</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ZN9999.XSGE</th>\n",
       "      <td>锌主力合约</td>\n",
       "      <td>ZN9999</td>\n",
       "      <td>2007-03-26</td>\n",
       "      <td>2030-01-01</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5016 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            display_name    name start_date   end_date     type\n",
       "A0501.XDCE        豆一0501   a0501 2003-07-15 2005-01-17  futures\n",
       "A0503.XDCE        豆一0503   a0503 2003-09-15 2005-03-14  futures\n",
       "A0505.XDCE        豆一0505   a0505 2003-11-17 2005-05-20  futures\n",
       "A0507.XDCE        豆一0507   a0507 2004-01-16 2005-07-14  futures\n",
       "A0509.XDCE        豆一0509   a0509 2004-03-15 2005-09-14  futures\n",
       "A0511.XDCE        豆一0511   a0511 2004-05-24 2005-11-14  futures\n",
       "A0601.XDCE        豆一0601   a0601 2004-07-15 2006-01-17  futures\n",
       "A0603.XDCE        豆一0603   a0603 2004-09-15 2006-03-14  futures\n",
       "A0605.XDCE        豆一0605   a0605 2004-11-15 2006-05-19  futures\n",
       "A0607.XDCE        豆一0607   a0607 2005-01-18 2006-07-14  futures\n",
       "A0609.XDCE        豆一0609   a0609 2005-03-15 2006-09-14  futures\n",
       "A0611.XDCE        豆一0611   a0611 2005-05-23 2006-11-14  futures\n",
       "A0701.XDCE        豆一0701   a0701 2005-07-15 2007-01-17  futures\n",
       "A0703.XDCE        豆一0703   a0703 2005-09-15 2007-03-14  futures\n",
       "A0705.XDCE        豆一0705   a0705 2005-11-15 2007-05-21  futures\n",
       "A0707.XDCE        豆一0707   a0707 2006-01-18 2007-07-13  futures\n",
       "A0709.XDCE        豆一0709   a0709 2006-03-15 2007-09-14  futures\n",
       "A0711.XDCE        豆一0711   a0711 2006-05-22 2007-11-14  futures\n",
       "A0801.XDCE        豆一0801   a0801 2006-07-17 2008-01-15  futures\n",
       "A0803.XDCE        豆一0803   a0803 2006-09-15 2008-03-14  futures\n",
       "A0805.XDCE        豆一0805   a0805 2006-11-15 2008-05-16  futures\n",
       "A0807.XDCE        豆一0807   a0807 2007-01-18 2008-07-14  futures\n",
       "A0809.XDCE        豆一0809   a0809 2007-03-15 2008-09-12  futures\n",
       "A0811.XDCE        豆一0811   a0811 2007-05-22 2008-11-14  futures\n",
       "A0901.XDCE        豆一0901   a0901 2007-07-16 2009-01-16  futures\n",
       "A0903.XDCE        豆一0903   a0903 2007-09-17 2009-03-13  futures\n",
       "A0905.XDCE        豆一0905   a0905 2007-11-15 2009-05-15  futures\n",
       "A0907.XDCE        豆一0907   a0907 2008-01-16 2009-07-14  futures\n",
       "A0909.XDCE        豆一0909   a0909 2008-03-17 2009-09-14  futures\n",
       "A0911.XDCE        豆一0911   a0911 2008-05-19 2009-11-13  futures\n",
       "...                  ...     ...        ...        ...      ...\n",
       "ZN1802.XSGE        锌1802  zn1802 2017-02-16 2018-02-09  futures\n",
       "ZN1803.XSGE        锌1803  zn1803 2017-03-16 2018-03-15  futures\n",
       "ZN1804.XSGE        锌1804  zn1804 2017-04-18 2018-04-16  futures\n",
       "ZN1805.XSGE        锌1805  zn1805 2017-05-16 2018-05-15  futures\n",
       "ZN1806.XSGE        锌1806  zn1806 2017-06-16 2018-06-15  futures\n",
       "ZN1807.XSGE        锌1807  zn1807 2017-07-18 2018-07-16  futures\n",
       "ZN1808.XSGE        锌1808  zn1808 2017-08-16 2018-08-15  futures\n",
       "ZN1809.XSGE        锌1809  zn1809 2017-09-18 2018-09-17  futures\n",
       "ZN1810.XSGE        锌1810  zn1810 2017-10-17 2018-10-15  futures\n",
       "ZN1811.XSGE        锌1811  zn1811 2017-11-16 2018-11-15  futures\n",
       "ZN1812.XSGE        锌1812  zn1812 2017-12-18 2018-12-17  futures\n",
       "ZN1901.XSGE        锌1901  zn1901 2018-01-16 2019-01-15  futures\n",
       "ZN1902.XSGE        锌1902  zn1902 2018-02-12 2019-02-15  futures\n",
       "ZN1903.XSGE        锌1903  zn1903 2018-03-16 2019-03-15  futures\n",
       "ZN1904.XSGE        锌1904  zn1904 2018-04-17 2019-04-15  futures\n",
       "ZN1905.XSGE        锌1905  zn1905 2018-05-16 2019-05-15  futures\n",
       "ZN1906.XSGE        锌1906  zn1906 2018-06-19 2019-06-17  futures\n",
       "ZN1907.XSGE        锌1907  zn1907 2018-07-17 2019-07-15  futures\n",
       "ZN1908.XSGE        锌1908  zn1908 2018-08-16 2019-08-15  futures\n",
       "ZN1909.XSGE        锌1909  zn1909 2018-09-18 2019-09-16  futures\n",
       "ZN1910.XSGE        锌1910  zn1910 2018-10-16 2019-10-15  futures\n",
       "ZN1911.XSGE        锌1911  zn1911 2018-11-16 2019-11-15  futures\n",
       "ZN1912.XSGE        锌1912  zn1912 2018-12-18 2019-12-16  futures\n",
       "ZN2001.XSGE        锌2001  zn2001 2019-01-16 2020-01-15  futures\n",
       "ZN2002.XSGE        锌2002  zn2002 2019-02-18 2020-02-17  futures\n",
       "ZN2003.XSGE        锌2003  zn2003 2019-03-18 2020-03-16  futures\n",
       "ZN2004.XSGE        锌2004  zn2004 2019-04-16 2020-04-15  futures\n",
       "ZN2005.XSGE        锌2005  zn2005 2019-05-16 2020-05-15  futures\n",
       "ZN8888.XSGE        锌期货指数  ZN8888 2007-03-26 2030-01-01  futures\n",
       "ZN9999.XSGE        锌主力合约  ZN9999 2007-03-26 2030-01-01  futures\n",
       "\n",
       "[5016 rows x 5 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_future_all = get_all_securities(['futures'])\n",
    "df_future_all"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>display_name</th>\n",
       "      <th>name</th>\n",
       "      <th>start_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>IC1505.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1505</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-05-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1506.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1506</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-06-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1507.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1507</td>\n",
       "      <td>2015-05-18</td>\n",
       "      <td>2015-07-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1508.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1508</td>\n",
       "      <td>2015-06-23</td>\n",
       "      <td>2015-08-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1509.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1509</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-09-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1510.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1510</td>\n",
       "      <td>2015-08-24</td>\n",
       "      <td>2015-10-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1511.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1511</td>\n",
       "      <td>2015-09-21</td>\n",
       "      <td>2015-11-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1512.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1512</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-12-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1601.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1601</td>\n",
       "      <td>2015-11-23</td>\n",
       "      <td>2016-01-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1602.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1602</td>\n",
       "      <td>2015-12-21</td>\n",
       "      <td>2016-02-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1603.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1603</td>\n",
       "      <td>2015-07-20</td>\n",
       "      <td>2016-03-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1604.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1604</td>\n",
       "      <td>2016-02-22</td>\n",
       "      <td>2016-04-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1605.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1605</td>\n",
       "      <td>2016-03-21</td>\n",
       "      <td>2016-05-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1606.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1606</td>\n",
       "      <td>2015-10-19</td>\n",
       "      <td>2016-06-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1607.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1607</td>\n",
       "      <td>2016-05-23</td>\n",
       "      <td>2016-07-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1608.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1608</td>\n",
       "      <td>2016-06-20</td>\n",
       "      <td>2016-08-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1609.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1609</td>\n",
       "      <td>2016-01-18</td>\n",
       "      <td>2016-09-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1610.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1610</td>\n",
       "      <td>2016-08-22</td>\n",
       "      <td>2016-10-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1611.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1611</td>\n",
       "      <td>2016-09-20</td>\n",
       "      <td>2016-11-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1612.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1612</td>\n",
       "      <td>2016-04-18</td>\n",
       "      <td>2016-12-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1701.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1701</td>\n",
       "      <td>2016-11-21</td>\n",
       "      <td>2017-01-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1702.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1702</td>\n",
       "      <td>2016-12-19</td>\n",
       "      <td>2017-02-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1703.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1703</td>\n",
       "      <td>2016-07-18</td>\n",
       "      <td>2017-03-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1704.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1704</td>\n",
       "      <td>2017-02-20</td>\n",
       "      <td>2017-04-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1705.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1705</td>\n",
       "      <td>2017-03-20</td>\n",
       "      <td>2017-05-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1706.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1706</td>\n",
       "      <td>2016-10-24</td>\n",
       "      <td>2017-06-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1707.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1707</td>\n",
       "      <td>2017-05-22</td>\n",
       "      <td>2017-07-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1708.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1708</td>\n",
       "      <td>2017-06-19</td>\n",
       "      <td>2017-08-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1709.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1709</td>\n",
       "      <td>2017-01-23</td>\n",
       "      <td>2017-09-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1710.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1710</td>\n",
       "      <td>2017-08-21</td>\n",
       "      <td>2017-10-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1711.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1711</td>\n",
       "      <td>2017-09-18</td>\n",
       "      <td>2017-11-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1712.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1712</td>\n",
       "      <td>2017-04-24</td>\n",
       "      <td>2017-12-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1801.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1801</td>\n",
       "      <td>2017-11-20</td>\n",
       "      <td>2018-01-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1802.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1802</td>\n",
       "      <td>2017-12-18</td>\n",
       "      <td>2018-02-22</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1803.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1803</td>\n",
       "      <td>2017-07-24</td>\n",
       "      <td>2018-03-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1804.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1804</td>\n",
       "      <td>2018-02-23</td>\n",
       "      <td>2018-04-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1805.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1805</td>\n",
       "      <td>2018-03-19</td>\n",
       "      <td>2018-05-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1806.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1806</td>\n",
       "      <td>2017-10-23</td>\n",
       "      <td>2018-06-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1807.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1807</td>\n",
       "      <td>2018-05-21</td>\n",
       "      <td>2018-07-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1808.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1808</td>\n",
       "      <td>2018-06-19</td>\n",
       "      <td>2018-08-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1809.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1809</td>\n",
       "      <td>2018-01-22</td>\n",
       "      <td>2018-09-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1810.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1810</td>\n",
       "      <td>2018-08-20</td>\n",
       "      <td>2018-10-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1811.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1811</td>\n",
       "      <td>2018-09-25</td>\n",
       "      <td>2018-11-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1812.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1812</td>\n",
       "      <td>2018-04-23</td>\n",
       "      <td>2018-12-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1901.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1901</td>\n",
       "      <td>2018-11-19</td>\n",
       "      <td>2019-01-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1902.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1902</td>\n",
       "      <td>2018-12-24</td>\n",
       "      <td>2019-02-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1903.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1903</td>\n",
       "      <td>2018-07-23</td>\n",
       "      <td>2019-03-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1904.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1904</td>\n",
       "      <td>2019-02-18</td>\n",
       "      <td>2019-04-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1905.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1905</td>\n",
       "      <td>2019-03-18</td>\n",
       "      <td>2019-05-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1906.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1906</td>\n",
       "      <td>2018-10-22</td>\n",
       "      <td>2019-06-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1907.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1907</td>\n",
       "      <td>2019-05-20</td>\n",
       "      <td>2019-07-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1908.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1908</td>\n",
       "      <td>2019-06-24</td>\n",
       "      <td>2019-08-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1909.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1909</td>\n",
       "      <td>2019-01-21</td>\n",
       "      <td>2019-09-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1912.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1912</td>\n",
       "      <td>2019-04-22</td>\n",
       "      <td>2019-12-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC8888.CCFX</th>\n",
       "      <td>中证500期货指数</td>\n",
       "      <td>IC8888</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2030-01-01</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC9999.CCFX</th>\n",
       "      <td>中证500主力合约</td>\n",
       "      <td>IC9999</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2030-01-01</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            display_name    name start_date   end_date     type\n",
       "IC1505.CCFX    中证500股指期货  IC1505 2015-04-16 2015-05-15  futures\n",
       "IC1506.CCFX    中证500股指期货  IC1506 2015-04-16 2015-06-19  futures\n",
       "IC1507.CCFX    中证500股指期货  IC1507 2015-05-18 2015-07-17  futures\n",
       "IC1508.CCFX    中证500股指期货  IC1508 2015-06-23 2015-08-21  futures\n",
       "IC1509.CCFX    中证500股指期货  IC1509 2015-04-16 2015-09-18  futures\n",
       "IC1510.CCFX    中证500股指期货  IC1510 2015-08-24 2015-10-16  futures\n",
       "IC1511.CCFX    中证500股指期货  IC1511 2015-09-21 2015-11-20  futures\n",
       "IC1512.CCFX    中证500股指期货  IC1512 2015-04-16 2015-12-18  futures\n",
       "IC1601.CCFX    中证500股指期货  IC1601 2015-11-23 2016-01-15  futures\n",
       "IC1602.CCFX    中证500股指期货  IC1602 2015-12-21 2016-02-19  futures\n",
       "IC1603.CCFX    中证500股指期货  IC1603 2015-07-20 2016-03-18  futures\n",
       "IC1604.CCFX    中证500股指期货  IC1604 2016-02-22 2016-04-15  futures\n",
       "IC1605.CCFX    中证500股指期货  IC1605 2016-03-21 2016-05-20  futures\n",
       "IC1606.CCFX    中证500股指期货  IC1606 2015-10-19 2016-06-17  futures\n",
       "IC1607.CCFX    中证500股指期货  IC1607 2016-05-23 2016-07-15  futures\n",
       "IC1608.CCFX    中证500股指期货  IC1608 2016-06-20 2016-08-19  futures\n",
       "IC1609.CCFX    中证500股指期货  IC1609 2016-01-18 2016-09-19  futures\n",
       "IC1610.CCFX    中证500股指期货  IC1610 2016-08-22 2016-10-21  futures\n",
       "IC1611.CCFX    中证500股指期货  IC1611 2016-09-20 2016-11-18  futures\n",
       "IC1612.CCFX    中证500股指期货  IC1612 2016-04-18 2016-12-16  futures\n",
       "IC1701.CCFX    中证500股指期货  IC1701 2016-11-21 2017-01-20  futures\n",
       "IC1702.CCFX    中证500股指期货  IC1702 2016-12-19 2017-02-17  futures\n",
       "IC1703.CCFX    中证500股指期货  IC1703 2016-07-18 2017-03-17  futures\n",
       "IC1704.CCFX    中证500股指期货  IC1704 2017-02-20 2017-04-21  futures\n",
       "IC1705.CCFX    中证500股指期货  IC1705 2017-03-20 2017-05-19  futures\n",
       "IC1706.CCFX    中证500股指期货  IC1706 2016-10-24 2017-06-16  futures\n",
       "IC1707.CCFX    中证500股指期货  IC1707 2017-05-22 2017-07-21  futures\n",
       "IC1708.CCFX    中证500股指期货  IC1708 2017-06-19 2017-08-18  futures\n",
       "IC1709.CCFX    中证500股指期货  IC1709 2017-01-23 2017-09-15  futures\n",
       "IC1710.CCFX    中证500股指期货  IC1710 2017-08-21 2017-10-20  futures\n",
       "IC1711.CCFX    中证500股指期货  IC1711 2017-09-18 2017-11-17  futures\n",
       "IC1712.CCFX    中证500股指期货  IC1712 2017-04-24 2017-12-15  futures\n",
       "IC1801.CCFX    中证500股指期货  IC1801 2017-11-20 2018-01-19  futures\n",
       "IC1802.CCFX    中证500股指期货  IC1802 2017-12-18 2018-02-22  futures\n",
       "IC1803.CCFX    中证500股指期货  IC1803 2017-07-24 2018-03-16  futures\n",
       "IC1804.CCFX    中证500股指期货  IC1804 2018-02-23 2018-04-20  futures\n",
       "IC1805.CCFX    中证500股指期货  IC1805 2018-03-19 2018-05-18  futures\n",
       "IC1806.CCFX    中证500股指期货  IC1806 2017-10-23 2018-06-15  futures\n",
       "IC1807.CCFX    中证500股指期货  IC1807 2018-05-21 2018-07-20  futures\n",
       "IC1808.CCFX    中证500股指期货  IC1808 2018-06-19 2018-08-17  futures\n",
       "IC1809.CCFX    中证500股指期货  IC1809 2018-01-22 2018-09-21  futures\n",
       "IC1810.CCFX    中证500股指期货  IC1810 2018-08-20 2018-10-19  futures\n",
       "IC1811.CCFX    中证500股指期货  IC1811 2018-09-25 2018-11-16  futures\n",
       "IC1812.CCFX    中证500股指期货  IC1812 2018-04-23 2018-12-21  futures\n",
       "IC1901.CCFX    中证500股指期货  IC1901 2018-11-19 2019-01-18  futures\n",
       "IC1902.CCFX    中证500股指期货  IC1902 2018-12-24 2019-02-15  futures\n",
       "IC1903.CCFX    中证500股指期货  IC1903 2018-07-23 2019-03-15  futures\n",
       "IC1904.CCFX    中证500股指期货  IC1904 2019-02-18 2019-04-19  futures\n",
       "IC1905.CCFX    中证500股指期货  IC1905 2019-03-18 2019-05-17  futures\n",
       "IC1906.CCFX    中证500股指期货  IC1906 2018-10-22 2019-06-21  futures\n",
       "IC1907.CCFX    中证500股指期货  IC1907 2019-05-20 2019-07-19  futures\n",
       "IC1908.CCFX    中证500股指期货  IC1908 2019-06-24 2019-08-16  futures\n",
       "IC1909.CCFX    中证500股指期货  IC1909 2019-01-21 2019-09-20  futures\n",
       "IC1912.CCFX    中证500股指期货  IC1912 2019-04-22 2019-12-20  futures\n",
       "IC8888.CCFX    中证500期货指数  IC8888 2015-04-16 2030-01-01  futures\n",
       "IC9999.CCFX    中证500主力合约  IC9999 2015-04-16 2030-01-01  futures"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list_ccfx_IC = []\n",
    "list_ccfx_IF = []\n",
    "list_ccfx_IH = []\n",
    "for future_index in df_future_all.index:\n",
    "    if 'IC' in future_index:\n",
    "        list_ccfx_IC.append(future_index)\n",
    "    elif 'IF' in future_index:\n",
    "        list_ccfx_IF.append(future_index)\n",
    "    elif 'IH' in future_index:\n",
    "        list_ccfx_IH.append(future_index)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>display_name</th>\n",
       "      <th>name</th>\n",
       "      <th>start_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>IC1505.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1505</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-05-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1506.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1506</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-06-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1507.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1507</td>\n",
       "      <td>2015-05-18</td>\n",
       "      <td>2015-07-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1508.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1508</td>\n",
       "      <td>2015-06-23</td>\n",
       "      <td>2015-08-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1509.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1509</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-09-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1510.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1510</td>\n",
       "      <td>2015-08-24</td>\n",
       "      <td>2015-10-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1511.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1511</td>\n",
       "      <td>2015-09-21</td>\n",
       "      <td>2015-11-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1512.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1512</td>\n",
       "      <td>2015-04-16</td>\n",
       "      <td>2015-12-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1601.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1601</td>\n",
       "      <td>2015-11-23</td>\n",
       "      <td>2016-01-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1602.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1602</td>\n",
       "      <td>2015-12-21</td>\n",
       "      <td>2016-02-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1603.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1603</td>\n",
       "      <td>2015-07-20</td>\n",
       "      <td>2016-03-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1604.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1604</td>\n",
       "      <td>2016-02-22</td>\n",
       "      <td>2016-04-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1605.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1605</td>\n",
       "      <td>2016-03-21</td>\n",
       "      <td>2016-05-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1606.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1606</td>\n",
       "      <td>2015-10-19</td>\n",
       "      <td>2016-06-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1607.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1607</td>\n",
       "      <td>2016-05-23</td>\n",
       "      <td>2016-07-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1608.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1608</td>\n",
       "      <td>2016-06-20</td>\n",
       "      <td>2016-08-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1609.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1609</td>\n",
       "      <td>2016-01-18</td>\n",
       "      <td>2016-09-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1610.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1610</td>\n",
       "      <td>2016-08-22</td>\n",
       "      <td>2016-10-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1611.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1611</td>\n",
       "      <td>2016-09-20</td>\n",
       "      <td>2016-11-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1612.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1612</td>\n",
       "      <td>2016-04-18</td>\n",
       "      <td>2016-12-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1701.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1701</td>\n",
       "      <td>2016-11-21</td>\n",
       "      <td>2017-01-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1702.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1702</td>\n",
       "      <td>2016-12-19</td>\n",
       "      <td>2017-02-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1703.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1703</td>\n",
       "      <td>2016-07-18</td>\n",
       "      <td>2017-03-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1704.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1704</td>\n",
       "      <td>2017-02-20</td>\n",
       "      <td>2017-04-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1705.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1705</td>\n",
       "      <td>2017-03-20</td>\n",
       "      <td>2017-05-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1706.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1706</td>\n",
       "      <td>2016-10-24</td>\n",
       "      <td>2017-06-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1707.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1707</td>\n",
       "      <td>2017-05-22</td>\n",
       "      <td>2017-07-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1708.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1708</td>\n",
       "      <td>2017-06-19</td>\n",
       "      <td>2017-08-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1709.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1709</td>\n",
       "      <td>2017-01-23</td>\n",
       "      <td>2017-09-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1710.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1710</td>\n",
       "      <td>2017-08-21</td>\n",
       "      <td>2017-10-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1711.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1711</td>\n",
       "      <td>2017-09-18</td>\n",
       "      <td>2017-11-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1712.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1712</td>\n",
       "      <td>2017-04-24</td>\n",
       "      <td>2017-12-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1801.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1801</td>\n",
       "      <td>2017-11-20</td>\n",
       "      <td>2018-01-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1802.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1802</td>\n",
       "      <td>2017-12-18</td>\n",
       "      <td>2018-02-22</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1803.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1803</td>\n",
       "      <td>2017-07-24</td>\n",
       "      <td>2018-03-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1804.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1804</td>\n",
       "      <td>2018-02-23</td>\n",
       "      <td>2018-04-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1805.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1805</td>\n",
       "      <td>2018-03-19</td>\n",
       "      <td>2018-05-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1806.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1806</td>\n",
       "      <td>2017-10-23</td>\n",
       "      <td>2018-06-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1807.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1807</td>\n",
       "      <td>2018-05-21</td>\n",
       "      <td>2018-07-20</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1808.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1808</td>\n",
       "      <td>2018-06-19</td>\n",
       "      <td>2018-08-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1809.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1809</td>\n",
       "      <td>2018-01-22</td>\n",
       "      <td>2018-09-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1810.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1810</td>\n",
       "      <td>2018-08-20</td>\n",
       "      <td>2018-10-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1811.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1811</td>\n",
       "      <td>2018-09-25</td>\n",
       "      <td>2018-11-16</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1812.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1812</td>\n",
       "      <td>2018-04-23</td>\n",
       "      <td>2018-12-21</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1901.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1901</td>\n",
       "      <td>2018-11-19</td>\n",
       "      <td>2019-01-18</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1902.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1902</td>\n",
       "      <td>2018-12-24</td>\n",
       "      <td>2019-02-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1903.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1903</td>\n",
       "      <td>2018-07-23</td>\n",
       "      <td>2019-03-15</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1904.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1904</td>\n",
       "      <td>2019-02-18</td>\n",
       "      <td>2019-04-19</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>IC1905.CCFX</th>\n",
       "      <td>中证500股指期货</td>\n",
       "      <td>IC1905</td>\n",
       "      <td>2019-03-18</td>\n",
       "      <td>2019-05-17</td>\n",
       "      <td>futures</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            display_name    name start_date   end_date     type\n",
       "IC1505.CCFX    中证500股指期货  IC1505 2015-04-16 2015-05-15  futures\n",
       "IC1506.CCFX    中证500股指期货  IC1506 2015-04-16 2015-06-19  futures\n",
       "IC1507.CCFX    中证500股指期货  IC1507 2015-05-18 2015-07-17  futures\n",
       "IC1508.CCFX    中证500股指期货  IC1508 2015-06-23 2015-08-21  futures\n",
       "IC1509.CCFX    中证500股指期货  IC1509 2015-04-16 2015-09-18  futures\n",
       "IC1510.CCFX    中证500股指期货  IC1510 2015-08-24 2015-10-16  futures\n",
       "IC1511.CCFX    中证500股指期货  IC1511 2015-09-21 2015-11-20  futures\n",
       "IC1512.CCFX    中证500股指期货  IC1512 2015-04-16 2015-12-18  futures\n",
       "IC1601.CCFX    中证500股指期货  IC1601 2015-11-23 2016-01-15  futures\n",
       "IC1602.CCFX    中证500股指期货  IC1602 2015-12-21 2016-02-19  futures\n",
       "IC1603.CCFX    中证500股指期货  IC1603 2015-07-20 2016-03-18  futures\n",
       "IC1604.CCFX    中证500股指期货  IC1604 2016-02-22 2016-04-15  futures\n",
       "IC1605.CCFX    中证500股指期货  IC1605 2016-03-21 2016-05-20  futures\n",
       "IC1606.CCFX    中证500股指期货  IC1606 2015-10-19 2016-06-17  futures\n",
       "IC1607.CCFX    中证500股指期货  IC1607 2016-05-23 2016-07-15  futures\n",
       "IC1608.CCFX    中证500股指期货  IC1608 2016-06-20 2016-08-19  futures\n",
       "IC1609.CCFX    中证500股指期货  IC1609 2016-01-18 2016-09-19  futures\n",
       "IC1610.CCFX    中证500股指期货  IC1610 2016-08-22 2016-10-21  futures\n",
       "IC1611.CCFX    中证500股指期货  IC1611 2016-09-20 2016-11-18  futures\n",
       "IC1612.CCFX    中证500股指期货  IC1612 2016-04-18 2016-12-16  futures\n",
       "IC1701.CCFX    中证500股指期货  IC1701 2016-11-21 2017-01-20  futures\n",
       "IC1702.CCFX    中证500股指期货  IC1702 2016-12-19 2017-02-17  futures\n",
       "IC1703.CCFX    中证500股指期货  IC1703 2016-07-18 2017-03-17  futures\n",
       "IC1704.CCFX    中证500股指期货  IC1704 2017-02-20 2017-04-21  futures\n",
       "IC1705.CCFX    中证500股指期货  IC1705 2017-03-20 2017-05-19  futures\n",
       "IC1706.CCFX    中证500股指期货  IC1706 2016-10-24 2017-06-16  futures\n",
       "IC1707.CCFX    中证500股指期货  IC1707 2017-05-22 2017-07-21  futures\n",
       "IC1708.CCFX    中证500股指期货  IC1708 2017-06-19 2017-08-18  futures\n",
       "IC1709.CCFX    中证500股指期货  IC1709 2017-01-23 2017-09-15  futures\n",
       "IC1710.CCFX    中证500股指期货  IC1710 2017-08-21 2017-10-20  futures\n",
       "IC1711.CCFX    中证500股指期货  IC1711 2017-09-18 2017-11-17  futures\n",
       "IC1712.CCFX    中证500股指期货  IC1712 2017-04-24 2017-12-15  futures\n",
       "IC1801.CCFX    中证500股指期货  IC1801 2017-11-20 2018-01-19  futures\n",
       "IC1802.CCFX    中证500股指期货  IC1802 2017-12-18 2018-02-22  futures\n",
       "IC1803.CCFX    中证500股指期货  IC1803 2017-07-24 2018-03-16  futures\n",
       "IC1804.CCFX    中证500股指期货  IC1804 2018-02-23 2018-04-20  futures\n",
       "IC1805.CCFX    中证500股指期货  IC1805 2018-03-19 2018-05-18  futures\n",
       "IC1806.CCFX    中证500股指期货  IC1806 2017-10-23 2018-06-15  futures\n",
       "IC1807.CCFX    中证500股指期货  IC1807 2018-05-21 2018-07-20  futures\n",
       "IC1808.CCFX    中证500股指期货  IC1808 2018-06-19 2018-08-17  futures\n",
       "IC1809.CCFX    中证500股指期货  IC1809 2018-01-22 2018-09-21  futures\n",
       "IC1810.CCFX    中证500股指期货  IC1810 2018-08-20 2018-10-19  futures\n",
       "IC1811.CCFX    中证500股指期货  IC1811 2018-09-25 2018-11-16  futures\n",
       "IC1812.CCFX    中证500股指期货  IC1812 2018-04-23 2018-12-21  futures\n",
       "IC1901.CCFX    中证500股指期货  IC1901 2018-11-19 2019-01-18  futures\n",
       "IC1902.CCFX    中证500股指期货  IC1902 2018-12-24 2019-02-15  futures\n",
       "IC1903.CCFX    中证500股指期货  IC1903 2018-07-23 2019-03-15  futures\n",
       "IC1904.CCFX    中证500股指期货  IC1904 2019-02-18 2019-04-19  futures\n",
       "IC1905.CCFX    中证500股指期货  IC1905 2019-03-18 2019-05-17  futures"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_ic = df_future_all.loc[list_ccfx_IC]\n",
    "#df_ic[\"end_date\"] = df_ic[\"end_date\"].apply(pd.Timestamp)\n",
    "df_ic = df_ic[df_ic[\"end_date\"] < pd.Timestamp.today()]\n",
    "df_ic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>money</th>\n",
       "      <th>IC1505.CCFXsett_price</th>\n",
       "      <th>IC1505.CCFXpositions</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-04-16</th>\n",
       "      <td>7681.0</td>\n",
       "      <td>7707.8</td>\n",
       "      <td>7790.0</td>\n",
       "      <td>7480.2</td>\n",
       "      <td>116888.0</td>\n",
       "      <td>1.792859e+11</td>\n",
       "      <td>7642.80</td>\n",
       "      <td>6643.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-17</th>\n",
       "      <td>7722.0</td>\n",
       "      <td>7758.2</td>\n",
       "      <td>7918.8</td>\n",
       "      <td>7631.2</td>\n",
       "      <td>114214.0</td>\n",
       "      <td>1.781400e+11</td>\n",
       "      <td>7803.40</td>\n",
       "      <td>9144.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-20</th>\n",
       "      <td>7760.0</td>\n",
       "      <td>7622.2</td>\n",
       "      <td>7857.0</td>\n",
       "      <td>7582.0</td>\n",
       "      <td>98781.0</td>\n",
       "      <td>1.525416e+11</td>\n",
       "      <td>7621.20</td>\n",
       "      <td>10706.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-21</th>\n",
       "      <td>7650.2</td>\n",
       "      <td>8140.4</td>\n",
       "      <td>8147.0</td>\n",
       "      <td>7640.2</td>\n",
       "      <td>132545.0</td>\n",
       "      <td>2.093753e+11</td>\n",
       "      <td>8055.60</td>\n",
       "      <td>16732.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-22</th>\n",
       "      <td>8158.0</td>\n",
       "      <td>8189.8</td>\n",
       "      <td>8237.8</td>\n",
       "      <td>8104.4</td>\n",
       "      <td>121034.0</td>\n",
       "      <td>1.976369e+11</td>\n",
       "      <td>8197.20</td>\n",
       "      <td>14854.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-23</th>\n",
       "      <td>8193.0</td>\n",
       "      <td>8265.6</td>\n",
       "      <td>8378.8</td>\n",
       "      <td>8160.4</td>\n",
       "      <td>132278.0</td>\n",
       "      <td>2.185364e+11</td>\n",
       "      <td>8266.40</td>\n",
       "      <td>14805.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-24</th>\n",
       "      <td>8247.8</td>\n",
       "      <td>8327.2</td>\n",
       "      <td>8349.8</td>\n",
       "      <td>8123.8</td>\n",
       "      <td>126381.0</td>\n",
       "      <td>2.077878e+11</td>\n",
       "      <td>8307.60</td>\n",
       "      <td>14603.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-27</th>\n",
       "      <td>8368.0</td>\n",
       "      <td>8347.2</td>\n",
       "      <td>8548.0</td>\n",
       "      <td>8292.0</td>\n",
       "      <td>125335.0</td>\n",
       "      <td>2.105637e+11</td>\n",
       "      <td>8361.60</td>\n",
       "      <td>15187.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-28</th>\n",
       "      <td>8308.0</td>\n",
       "      <td>8147.0</td>\n",
       "      <td>8419.0</td>\n",
       "      <td>8011.6</td>\n",
       "      <td>164120.0</td>\n",
       "      <td>2.689237e+11</td>\n",
       "      <td>8087.40</td>\n",
       "      <td>15900.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-29</th>\n",
       "      <td>8138.0</td>\n",
       "      <td>8302.2</td>\n",
       "      <td>8309.0</td>\n",
       "      <td>8079.0</td>\n",
       "      <td>134158.0</td>\n",
       "      <td>2.206065e+11</td>\n",
       "      <td>8276.20</td>\n",
       "      <td>17677.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-30</th>\n",
       "      <td>8320.0</td>\n",
       "      <td>8338.8</td>\n",
       "      <td>8408.0</td>\n",
       "      <td>8291.2</td>\n",
       "      <td>120118.0</td>\n",
       "      <td>2.006602e+11</td>\n",
       "      <td>8355.40</td>\n",
       "      <td>16354.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-04</th>\n",
       "      <td>8370.2</td>\n",
       "      <td>8347.2</td>\n",
       "      <td>8527.4</td>\n",
       "      <td>8202.4</td>\n",
       "      <td>101734.0</td>\n",
       "      <td>1.690824e+11</td>\n",
       "      <td>8322.40</td>\n",
       "      <td>16271.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-05</th>\n",
       "      <td>8334.8</td>\n",
       "      <td>8145.0</td>\n",
       "      <td>8345.0</td>\n",
       "      <td>8090.0</td>\n",
       "      <td>109987.0</td>\n",
       "      <td>1.808120e+11</td>\n",
       "      <td>8139.20</td>\n",
       "      <td>15884.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-06</th>\n",
       "      <td>8168.0</td>\n",
       "      <td>8040.8</td>\n",
       "      <td>8280.6</td>\n",
       "      <td>7970.0</td>\n",
       "      <td>111973.0</td>\n",
       "      <td>1.830955e+11</td>\n",
       "      <td>8058.40</td>\n",
       "      <td>15456.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-07</th>\n",
       "      <td>8020.0</td>\n",
       "      <td>7911.4</td>\n",
       "      <td>8068.0</td>\n",
       "      <td>7901.0</td>\n",
       "      <td>109599.0</td>\n",
       "      <td>1.746042e+11</td>\n",
       "      <td>7928.60</td>\n",
       "      <td>15127.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-08</th>\n",
       "      <td>7933.4</td>\n",
       "      <td>8171.2</td>\n",
       "      <td>8171.4</td>\n",
       "      <td>7921.0</td>\n",
       "      <td>121062.0</td>\n",
       "      <td>1.943685e+11</td>\n",
       "      <td>8103.00</td>\n",
       "      <td>16258.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-11</th>\n",
       "      <td>8170.0</td>\n",
       "      <td>8489.8</td>\n",
       "      <td>8508.0</td>\n",
       "      <td>8144.0</td>\n",
       "      <td>124722.0</td>\n",
       "      <td>2.074299e+11</td>\n",
       "      <td>8442.60</td>\n",
       "      <td>16314.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-12</th>\n",
       "      <td>8499.6</td>\n",
       "      <td>8647.8</td>\n",
       "      <td>8648.0</td>\n",
       "      <td>8415.4</td>\n",
       "      <td>152019.0</td>\n",
       "      <td>2.591044e+11</td>\n",
       "      <td>8597.60</td>\n",
       "      <td>14671.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-13</th>\n",
       "      <td>8595.0</td>\n",
       "      <td>8695.8</td>\n",
       "      <td>8779.0</td>\n",
       "      <td>8492.0</td>\n",
       "      <td>189658.0</td>\n",
       "      <td>3.283669e+11</td>\n",
       "      <td>8690.80</td>\n",
       "      <td>14624.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-14</th>\n",
       "      <td>8689.0</td>\n",
       "      <td>8760.4</td>\n",
       "      <td>8813.6</td>\n",
       "      <td>8645.2</td>\n",
       "      <td>112711.0</td>\n",
       "      <td>1.969418e+11</td>\n",
       "      <td>8754.20</td>\n",
       "      <td>8971.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-15</th>\n",
       "      <td>8754.8</td>\n",
       "      <td>8755.2</td>\n",
       "      <td>8769.8</td>\n",
       "      <td>8605.4</td>\n",
       "      <td>36739.0</td>\n",
       "      <td>6.391502e+10</td>\n",
       "      <td>8755.31</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close    high     low    volume         money  \\\n",
       "2015-04-16  7681.0  7707.8  7790.0  7480.2  116888.0  1.792859e+11   \n",
       "2015-04-17  7722.0  7758.2  7918.8  7631.2  114214.0  1.781400e+11   \n",
       "2015-04-20  7760.0  7622.2  7857.0  7582.0   98781.0  1.525416e+11   \n",
       "2015-04-21  7650.2  8140.4  8147.0  7640.2  132545.0  2.093753e+11   \n",
       "2015-04-22  8158.0  8189.8  8237.8  8104.4  121034.0  1.976369e+11   \n",
       "2015-04-23  8193.0  8265.6  8378.8  8160.4  132278.0  2.185364e+11   \n",
       "2015-04-24  8247.8  8327.2  8349.8  8123.8  126381.0  2.077878e+11   \n",
       "2015-04-27  8368.0  8347.2  8548.0  8292.0  125335.0  2.105637e+11   \n",
       "2015-04-28  8308.0  8147.0  8419.0  8011.6  164120.0  2.689237e+11   \n",
       "2015-04-29  8138.0  8302.2  8309.0  8079.0  134158.0  2.206065e+11   \n",
       "2015-04-30  8320.0  8338.8  8408.0  8291.2  120118.0  2.006602e+11   \n",
       "2015-05-04  8370.2  8347.2  8527.4  8202.4  101734.0  1.690824e+11   \n",
       "2015-05-05  8334.8  8145.0  8345.0  8090.0  109987.0  1.808120e+11   \n",
       "2015-05-06  8168.0  8040.8  8280.6  7970.0  111973.0  1.830955e+11   \n",
       "2015-05-07  8020.0  7911.4  8068.0  7901.0  109599.0  1.746042e+11   \n",
       "2015-05-08  7933.4  8171.2  8171.4  7921.0  121062.0  1.943685e+11   \n",
       "2015-05-11  8170.0  8489.8  8508.0  8144.0  124722.0  2.074299e+11   \n",
       "2015-05-12  8499.6  8647.8  8648.0  8415.4  152019.0  2.591044e+11   \n",
       "2015-05-13  8595.0  8695.8  8779.0  8492.0  189658.0  3.283669e+11   \n",
       "2015-05-14  8689.0  8760.4  8813.6  8645.2  112711.0  1.969418e+11   \n",
       "2015-05-15  8754.8  8755.2  8769.8  8605.4   36739.0  6.391502e+10   \n",
       "\n",
       "            IC1505.CCFXsett_price  IC1505.CCFXpositions  \n",
       "2015-04-16                7642.80                6643.0  \n",
       "2015-04-17                7803.40                9144.0  \n",
       "2015-04-20                7621.20               10706.0  \n",
       "2015-04-21                8055.60               16732.0  \n",
       "2015-04-22                8197.20               14854.0  \n",
       "2015-04-23                8266.40               14805.0  \n",
       "2015-04-24                8307.60               14603.0  \n",
       "2015-04-27                8361.60               15187.0  \n",
       "2015-04-28                8087.40               15900.0  \n",
       "2015-04-29                8276.20               17677.0  \n",
       "2015-04-30                8355.40               16354.0  \n",
       "2015-05-04                8322.40               16271.0  \n",
       "2015-05-05                8139.20               15884.0  \n",
       "2015-05-06                8058.40               15456.0  \n",
       "2015-05-07                7928.60               15127.0  \n",
       "2015-05-08                8103.00               16258.0  \n",
       "2015-05-11                8442.60               16314.0  \n",
       "2015-05-12                8597.60               14671.0  \n",
       "2015-05-13                8690.80               14624.0  \n",
       "2015-05-14                8754.20                8971.0  \n",
       "2015-05-15                8755.31                   0.0  "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_sett_price = get_extras('futures_sett_price',['IC1505.CCFX'],start_date=\"2015-04-16\", end_date='2015-05-15')\n",
    "df_positions = get_extras('futures_positions',['IC1505.CCFX'],start_date=\"2015-04-16\", end_date='2015-05-15')\n",
    "df_data = get_price('IC1505.CCFX', start_date=\"2015-04-16\", end_date='2015-05-15')\n",
    "df_data = pd.merge(df_data,df_sett_price,left_index=True,right_index=True)\n",
    "df_data = pd.merge(df_data,df_positions,left_index=True,right_index=True,suffixes=('_sett_price','_positions'))\n",
    "\n",
    "df_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>money</th>\n",
       "      <th>sett_price</th>\n",
       "      <th>IC1505.CCFXpositions</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-04-16</th>\n",
       "      <td>7681.0</td>\n",
       "      <td>7707.8</td>\n",
       "      <td>7790.0</td>\n",
       "      <td>7480.2</td>\n",
       "      <td>116888.0</td>\n",
       "      <td>1.792859e+11</td>\n",
       "      <td>7642.80</td>\n",
       "      <td>6643.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-17</th>\n",
       "      <td>7722.0</td>\n",
       "      <td>7758.2</td>\n",
       "      <td>7918.8</td>\n",
       "      <td>7631.2</td>\n",
       "      <td>114214.0</td>\n",
       "      <td>1.781400e+11</td>\n",
       "      <td>7803.40</td>\n",
       "      <td>9144.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-20</th>\n",
       "      <td>7760.0</td>\n",
       "      <td>7622.2</td>\n",
       "      <td>7857.0</td>\n",
       "      <td>7582.0</td>\n",
       "      <td>98781.0</td>\n",
       "      <td>1.525416e+11</td>\n",
       "      <td>7621.20</td>\n",
       "      <td>10706.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-21</th>\n",
       "      <td>7650.2</td>\n",
       "      <td>8140.4</td>\n",
       "      <td>8147.0</td>\n",
       "      <td>7640.2</td>\n",
       "      <td>132545.0</td>\n",
       "      <td>2.093753e+11</td>\n",
       "      <td>8055.60</td>\n",
       "      <td>16732.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-22</th>\n",
       "      <td>8158.0</td>\n",
       "      <td>8189.8</td>\n",
       "      <td>8237.8</td>\n",
       "      <td>8104.4</td>\n",
       "      <td>121034.0</td>\n",
       "      <td>1.976369e+11</td>\n",
       "      <td>8197.20</td>\n",
       "      <td>14854.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-23</th>\n",
       "      <td>8193.0</td>\n",
       "      <td>8265.6</td>\n",
       "      <td>8378.8</td>\n",
       "      <td>8160.4</td>\n",
       "      <td>132278.0</td>\n",
       "      <td>2.185364e+11</td>\n",
       "      <td>8266.40</td>\n",
       "      <td>14805.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-24</th>\n",
       "      <td>8247.8</td>\n",
       "      <td>8327.2</td>\n",
       "      <td>8349.8</td>\n",
       "      <td>8123.8</td>\n",
       "      <td>126381.0</td>\n",
       "      <td>2.077878e+11</td>\n",
       "      <td>8307.60</td>\n",
       "      <td>14603.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-27</th>\n",
       "      <td>8368.0</td>\n",
       "      <td>8347.2</td>\n",
       "      <td>8548.0</td>\n",
       "      <td>8292.0</td>\n",
       "      <td>125335.0</td>\n",
       "      <td>2.105637e+11</td>\n",
       "      <td>8361.60</td>\n",
       "      <td>15187.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-28</th>\n",
       "      <td>8308.0</td>\n",
       "      <td>8147.0</td>\n",
       "      <td>8419.0</td>\n",
       "      <td>8011.6</td>\n",
       "      <td>164120.0</td>\n",
       "      <td>2.689237e+11</td>\n",
       "      <td>8087.40</td>\n",
       "      <td>15900.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-29</th>\n",
       "      <td>8138.0</td>\n",
       "      <td>8302.2</td>\n",
       "      <td>8309.0</td>\n",
       "      <td>8079.0</td>\n",
       "      <td>134158.0</td>\n",
       "      <td>2.206065e+11</td>\n",
       "      <td>8276.20</td>\n",
       "      <td>17677.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-04-30</th>\n",
       "      <td>8320.0</td>\n",
       "      <td>8338.8</td>\n",
       "      <td>8408.0</td>\n",
       "      <td>8291.2</td>\n",
       "      <td>120118.0</td>\n",
       "      <td>2.006602e+11</td>\n",
       "      <td>8355.40</td>\n",
       "      <td>16354.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-04</th>\n",
       "      <td>8370.2</td>\n",
       "      <td>8347.2</td>\n",
       "      <td>8527.4</td>\n",
       "      <td>8202.4</td>\n",
       "      <td>101734.0</td>\n",
       "      <td>1.690824e+11</td>\n",
       "      <td>8322.40</td>\n",
       "      <td>16271.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-05</th>\n",
       "      <td>8334.8</td>\n",
       "      <td>8145.0</td>\n",
       "      <td>8345.0</td>\n",
       "      <td>8090.0</td>\n",
       "      <td>109987.0</td>\n",
       "      <td>1.808120e+11</td>\n",
       "      <td>8139.20</td>\n",
       "      <td>15884.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-06</th>\n",
       "      <td>8168.0</td>\n",
       "      <td>8040.8</td>\n",
       "      <td>8280.6</td>\n",
       "      <td>7970.0</td>\n",
       "      <td>111973.0</td>\n",
       "      <td>1.830955e+11</td>\n",
       "      <td>8058.40</td>\n",
       "      <td>15456.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-07</th>\n",
       "      <td>8020.0</td>\n",
       "      <td>7911.4</td>\n",
       "      <td>8068.0</td>\n",
       "      <td>7901.0</td>\n",
       "      <td>109599.0</td>\n",
       "      <td>1.746042e+11</td>\n",
       "      <td>7928.60</td>\n",
       "      <td>15127.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-08</th>\n",
       "      <td>7933.4</td>\n",
       "      <td>8171.2</td>\n",
       "      <td>8171.4</td>\n",
       "      <td>7921.0</td>\n",
       "      <td>121062.0</td>\n",
       "      <td>1.943685e+11</td>\n",
       "      <td>8103.00</td>\n",
       "      <td>16258.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-11</th>\n",
       "      <td>8170.0</td>\n",
       "      <td>8489.8</td>\n",
       "      <td>8508.0</td>\n",
       "      <td>8144.0</td>\n",
       "      <td>124722.0</td>\n",
       "      <td>2.074299e+11</td>\n",
       "      <td>8442.60</td>\n",
       "      <td>16314.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-12</th>\n",
       "      <td>8499.6</td>\n",
       "      <td>8647.8</td>\n",
       "      <td>8648.0</td>\n",
       "      <td>8415.4</td>\n",
       "      <td>152019.0</td>\n",
       "      <td>2.591044e+11</td>\n",
       "      <td>8597.60</td>\n",
       "      <td>14671.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-13</th>\n",
       "      <td>8595.0</td>\n",
       "      <td>8695.8</td>\n",
       "      <td>8779.0</td>\n",
       "      <td>8492.0</td>\n",
       "      <td>189658.0</td>\n",
       "      <td>3.283669e+11</td>\n",
       "      <td>8690.80</td>\n",
       "      <td>14624.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-14</th>\n",
       "      <td>8689.0</td>\n",
       "      <td>8760.4</td>\n",
       "      <td>8813.6</td>\n",
       "      <td>8645.2</td>\n",
       "      <td>112711.0</td>\n",
       "      <td>1.969418e+11</td>\n",
       "      <td>8754.20</td>\n",
       "      <td>8971.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-15</th>\n",
       "      <td>8754.8</td>\n",
       "      <td>8755.2</td>\n",
       "      <td>8769.8</td>\n",
       "      <td>8605.4</td>\n",
       "      <td>36739.0</td>\n",
       "      <td>6.391502e+10</td>\n",
       "      <td>8755.31</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              open   close    high     low    volume         money  \\\n",
       "2015-04-16  7681.0  7707.8  7790.0  7480.2  116888.0  1.792859e+11   \n",
       "2015-04-17  7722.0  7758.2  7918.8  7631.2  114214.0  1.781400e+11   \n",
       "2015-04-20  7760.0  7622.2  7857.0  7582.0   98781.0  1.525416e+11   \n",
       "2015-04-21  7650.2  8140.4  8147.0  7640.2  132545.0  2.093753e+11   \n",
       "2015-04-22  8158.0  8189.8  8237.8  8104.4  121034.0  1.976369e+11   \n",
       "2015-04-23  8193.0  8265.6  8378.8  8160.4  132278.0  2.185364e+11   \n",
       "2015-04-24  8247.8  8327.2  8349.8  8123.8  126381.0  2.077878e+11   \n",
       "2015-04-27  8368.0  8347.2  8548.0  8292.0  125335.0  2.105637e+11   \n",
       "2015-04-28  8308.0  8147.0  8419.0  8011.6  164120.0  2.689237e+11   \n",
       "2015-04-29  8138.0  8302.2  8309.0  8079.0  134158.0  2.206065e+11   \n",
       "2015-04-30  8320.0  8338.8  8408.0  8291.2  120118.0  2.006602e+11   \n",
       "2015-05-04  8370.2  8347.2  8527.4  8202.4  101734.0  1.690824e+11   \n",
       "2015-05-05  8334.8  8145.0  8345.0  8090.0  109987.0  1.808120e+11   \n",
       "2015-05-06  8168.0  8040.8  8280.6  7970.0  111973.0  1.830955e+11   \n",
       "2015-05-07  8020.0  7911.4  8068.0  7901.0  109599.0  1.746042e+11   \n",
       "2015-05-08  7933.4  8171.2  8171.4  7921.0  121062.0  1.943685e+11   \n",
       "2015-05-11  8170.0  8489.8  8508.0  8144.0  124722.0  2.074299e+11   \n",
       "2015-05-12  8499.6  8647.8  8648.0  8415.4  152019.0  2.591044e+11   \n",
       "2015-05-13  8595.0  8695.8  8779.0  8492.0  189658.0  3.283669e+11   \n",
       "2015-05-14  8689.0  8760.4  8813.6  8645.2  112711.0  1.969418e+11   \n",
       "2015-05-15  8754.8  8755.2  8769.8  8605.4   36739.0  6.391502e+10   \n",
       "\n",
       "            sett_price  IC1505.CCFXpositions  \n",
       "2015-04-16     7642.80                6643.0  \n",
       "2015-04-17     7803.40                9144.0  \n",
       "2015-04-20     7621.20               10706.0  \n",
       "2015-04-21     8055.60               16732.0  \n",
       "2015-04-22     8197.20               14854.0  \n",
       "2015-04-23     8266.40               14805.0  \n",
       "2015-04-24     8307.60               14603.0  \n",
       "2015-04-27     8361.60               15187.0  \n",
       "2015-04-28     8087.40               15900.0  \n",
       "2015-04-29     8276.20               17677.0  \n",
       "2015-04-30     8355.40               16354.0  \n",
       "2015-05-04     8322.40               16271.0  \n",
       "2015-05-05     8139.20               15884.0  \n",
       "2015-05-06     8058.40               15456.0  \n",
       "2015-05-07     7928.60               15127.0  \n",
       "2015-05-08     8103.00               16258.0  \n",
       "2015-05-11     8442.60               16314.0  \n",
       "2015-05-12     8597.60               14671.0  \n",
       "2015-05-13     8690.80               14624.0  \n",
       "2015-05-14     8754.20                8971.0  \n",
       "2015-05-15     8755.31                   0.0  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_data = df_data.rename(columns={'IC1505.CCFX'+'sett_price':\"sett_price\"})\n",
    "df_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_gz = get_price(\"511010.XSHG\", start_date=\"2013-03-25\", end_date=\"2019-06-17\", frequency='daily')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.028782911482620275 0.07587611976349748 0.07328154770628756 0.01108625176932559 -0.012012717222442992 0.06458181154127107\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "1.2279891578542437"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ret_2013 = (df_gz.loc['2013-12-31',[\"close\"]][\"close\"] - df_gz.loc[\"2013-03-25\",[\"close\"]][\"close\"])/ df_gz.loc[\"2013-03-25\",[\"close\"]][\"close\"]\n",
    "ret_2014 = (df_gz.loc['2014-12-31',[\"close\"]][\"close\"] - df_gz.loc[\"2014-01-02\",[\"close\"]][\"close\"])/ df_gz.loc[\"2014-01-02\",[\"close\"]][\"close\"]\n",
    "ret_2015 = (df_gz.loc['2015-12-31',[\"close\"]][\"close\"] - df_gz.loc[\"2015-01-05\",[\"close\"]][\"close\"])/ df_gz.loc[\"2015-01-05\",[\"close\"]][\"close\"]\n",
    "ret_2016 = (df_gz.loc['2016-12-30',[\"close\"]][\"close\"] - df_gz.loc[\"2016-01-04\",[\"close\"]][\"close\"])/ df_gz.loc[\"2016-01-04\",[\"close\"]][\"close\"]\n",
    "ret_2017 = (df_gz.loc['2017-12-29',[\"close\"]][\"close\"] - df_gz.loc[\"2017-01-03\",[\"close\"]][\"close\"])/ df_gz.loc[\"2017-01-03\",[\"close\"]][\"close\"]\n",
    "ret_2018 = (df_gz.loc['2018-12-28',[\"close\"]][\"close\"] - df_gz.loc[\"2018-01-02\",[\"close\"]][\"close\"])/ df_gz.loc[\"2018-01-02\",[\"close\"]][\"close\"]\n",
    "print(ret_2013, ret_2014, ret_2015, ret_2016, ret_2017, ret_2018)\n",
    "(1+ret_2014)*(1+ret_2015)*(1+ret_2016)*(1+ret_2017)*(1+ret_2018)\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_zq = get_price(\"399975.XSHE\",start_date=\"2007-07-25\", end_date=\"2019-06-21\", frequency='daily')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>volume</th>\n",
       "      <th>money</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-05-19</th>\n",
       "      <td>1518.04</td>\n",
       "      <td>1632.28</td>\n",
       "      <td>1659.57</td>\n",
       "      <td>1518.04</td>\n",
       "      <td>3.772612e+09</td>\n",
       "      <td>9.309065e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-20</th>\n",
       "      <td>1637.58</td>\n",
       "      <td>1604.66</td>\n",
       "      <td>1637.58</td>\n",
       "      <td>1602.00</td>\n",
       "      <td>2.828233e+09</td>\n",
       "      <td>7.147268e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-21</th>\n",
       "      <td>1603.09</td>\n",
       "      <td>1601.81</td>\n",
       "      <td>1610.02</td>\n",
       "      <td>1582.24</td>\n",
       "      <td>1.858109e+09</td>\n",
       "      <td>4.617736e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-22</th>\n",
       "      <td>1619.44</td>\n",
       "      <td>1653.20</td>\n",
       "      <td>1681.65</td>\n",
       "      <td>1614.60</td>\n",
       "      <td>3.418169e+09</td>\n",
       "      <td>8.649188e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-25</th>\n",
       "      <td>1658.89</td>\n",
       "      <td>1700.70</td>\n",
       "      <td>1730.00</td>\n",
       "      <td>1658.89</td>\n",
       "      <td>3.803496e+09</td>\n",
       "      <td>9.765779e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-26</th>\n",
       "      <td>1710.75</td>\n",
       "      <td>1720.23</td>\n",
       "      <td>1735.71</td>\n",
       "      <td>1667.81</td>\n",
       "      <td>4.057747e+09</td>\n",
       "      <td>9.964947e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-27</th>\n",
       "      <td>1722.82</td>\n",
       "      <td>1716.63</td>\n",
       "      <td>1746.18</td>\n",
       "      <td>1705.79</td>\n",
       "      <td>3.367540e+09</td>\n",
       "      <td>8.518020e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-28</th>\n",
       "      <td>1713.73</td>\n",
       "      <td>1561.57</td>\n",
       "      <td>1717.02</td>\n",
       "      <td>1561.08</td>\n",
       "      <td>3.846429e+09</td>\n",
       "      <td>9.534386e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-05-29</th>\n",
       "      <td>1571.14</td>\n",
       "      <td>1544.43</td>\n",
       "      <td>1591.32</td>\n",
       "      <td>1516.40</td>\n",
       "      <td>2.814375e+09</td>\n",
       "      <td>6.608362e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-01</th>\n",
       "      <td>1545.85</td>\n",
       "      <td>1628.47</td>\n",
       "      <td>1650.87</td>\n",
       "      <td>1524.92</td>\n",
       "      <td>3.083108e+09</td>\n",
       "      <td>7.413112e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-02</th>\n",
       "      <td>1621.63</td>\n",
       "      <td>1622.80</td>\n",
       "      <td>1636.12</td>\n",
       "      <td>1595.51</td>\n",
       "      <td>2.506534e+09</td>\n",
       "      <td>6.052673e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-03</th>\n",
       "      <td>1627.73</td>\n",
       "      <td>1613.43</td>\n",
       "      <td>1653.87</td>\n",
       "      <td>1604.61</td>\n",
       "      <td>2.415140e+09</td>\n",
       "      <td>6.011070e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-04</th>\n",
       "      <td>1616.12</td>\n",
       "      <td>1645.17</td>\n",
       "      <td>1658.33</td>\n",
       "      <td>1539.24</td>\n",
       "      <td>3.140065e+09</td>\n",
       "      <td>7.856293e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-05</th>\n",
       "      <td>1679.26</td>\n",
       "      <td>1637.92</td>\n",
       "      <td>1687.32</td>\n",
       "      <td>1610.20</td>\n",
       "      <td>3.208125e+09</td>\n",
       "      <td>8.120543e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-08</th>\n",
       "      <td>1640.19</td>\n",
       "      <td>1717.10</td>\n",
       "      <td>1722.04</td>\n",
       "      <td>1626.97</td>\n",
       "      <td>4.173555e+09</td>\n",
       "      <td>1.089132e+11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-09</th>\n",
       "      <td>1730.30</td>\n",
       "      <td>1681.95</td>\n",
       "      <td>1734.67</td>\n",
       "      <td>1664.66</td>\n",
       "      <td>2.873395e+09</td>\n",
       "      <td>7.781870e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-10</th>\n",
       "      <td>1665.51</td>\n",
       "      <td>1662.42</td>\n",
       "      <td>1682.94</td>\n",
       "      <td>1651.48</td>\n",
       "      <td>2.090365e+09</td>\n",
       "      <td>5.493834e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-11</th>\n",
       "      <td>1658.97</td>\n",
       "      <td>1639.59</td>\n",
       "      <td>1661.39</td>\n",
       "      <td>1627.61</td>\n",
       "      <td>1.853819e+09</td>\n",
       "      <td>4.830030e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-12</th>\n",
       "      <td>1647.49</td>\n",
       "      <td>1639.83</td>\n",
       "      <td>1666.54</td>\n",
       "      <td>1632.67</td>\n",
       "      <td>1.925206e+09</td>\n",
       "      <td>4.906892e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-15</th>\n",
       "      <td>1667.83</td>\n",
       "      <td>1604.23</td>\n",
       "      <td>1673.87</td>\n",
       "      <td>1601.46</td>\n",
       "      <td>2.802076e+09</td>\n",
       "      <td>7.212277e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-16</th>\n",
       "      <td>1593.45</td>\n",
       "      <td>1583.84</td>\n",
       "      <td>1634.43</td>\n",
       "      <td>1566.35</td>\n",
       "      <td>2.327779e+09</td>\n",
       "      <td>5.824746e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-17</th>\n",
       "      <td>1587.13</td>\n",
       "      <td>1589.90</td>\n",
       "      <td>1596.17</td>\n",
       "      <td>1543.04</td>\n",
       "      <td>1.991538e+09</td>\n",
       "      <td>4.899048e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-18</th>\n",
       "      <td>1576.22</td>\n",
       "      <td>1508.40</td>\n",
       "      <td>1578.16</td>\n",
       "      <td>1508.29</td>\n",
       "      <td>1.845064e+09</td>\n",
       "      <td>4.558884e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-19</th>\n",
       "      <td>1487.18</td>\n",
       "      <td>1434.46</td>\n",
       "      <td>1536.65</td>\n",
       "      <td>1434.16</td>\n",
       "      <td>2.056593e+09</td>\n",
       "      <td>4.892117e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-23</th>\n",
       "      <td>1441.61</td>\n",
       "      <td>1489.43</td>\n",
       "      <td>1492.25</td>\n",
       "      <td>1396.08</td>\n",
       "      <td>2.237090e+09</td>\n",
       "      <td>5.208910e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-24</th>\n",
       "      <td>1496.18</td>\n",
       "      <td>1489.75</td>\n",
       "      <td>1496.18</td>\n",
       "      <td>1457.48</td>\n",
       "      <td>2.101682e+09</td>\n",
       "      <td>5.129546e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-25</th>\n",
       "      <td>1493.68</td>\n",
       "      <td>1446.64</td>\n",
       "      <td>1518.43</td>\n",
       "      <td>1439.33</td>\n",
       "      <td>2.355345e+09</td>\n",
       "      <td>5.771941e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-26</th>\n",
       "      <td>1414.17</td>\n",
       "      <td>1307.03</td>\n",
       "      <td>1470.29</td>\n",
       "      <td>1301.67</td>\n",
       "      <td>3.141867e+09</td>\n",
       "      <td>7.027144e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-29</th>\n",
       "      <td>1348.72</td>\n",
       "      <td>1214.23</td>\n",
       "      <td>1348.72</td>\n",
       "      <td>1177.96</td>\n",
       "      <td>3.638394e+09</td>\n",
       "      <td>7.542973e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-06-30</th>\n",
       "      <td>1214.13</td>\n",
       "      <td>1324.61</td>\n",
       "      <td>1325.17</td>\n",
       "      <td>1159.07</td>\n",
       "      <td>3.557366e+09</td>\n",
       "      <td>7.262728e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-10</th>\n",
       "      <td>695.88</td>\n",
       "      <td>715.19</td>\n",
       "      <td>718.16</td>\n",
       "      <td>682.53</td>\n",
       "      <td>2.759147e+09</td>\n",
       "      <td>2.951191e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-13</th>\n",
       "      <td>702.67</td>\n",
       "      <td>698.74</td>\n",
       "      <td>707.17</td>\n",
       "      <td>696.02</td>\n",
       "      <td>1.483093e+09</td>\n",
       "      <td>1.567958e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-14</th>\n",
       "      <td>690.40</td>\n",
       "      <td>691.11</td>\n",
       "      <td>705.39</td>\n",
       "      <td>690.28</td>\n",
       "      <td>1.476701e+09</td>\n",
       "      <td>1.554321e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-15</th>\n",
       "      <td>697.74</td>\n",
       "      <td>703.60</td>\n",
       "      <td>706.68</td>\n",
       "      <td>695.75</td>\n",
       "      <td>1.555859e+09</td>\n",
       "      <td>1.707681e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-16</th>\n",
       "      <td>702.16</td>\n",
       "      <td>703.59</td>\n",
       "      <td>706.98</td>\n",
       "      <td>697.41</td>\n",
       "      <td>1.233870e+09</td>\n",
       "      <td>1.275443e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-17</th>\n",
       "      <td>704.88</td>\n",
       "      <td>674.07</td>\n",
       "      <td>705.42</td>\n",
       "      <td>669.43</td>\n",
       "      <td>1.798740e+09</td>\n",
       "      <td>1.803187e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-20</th>\n",
       "      <td>670.19</td>\n",
       "      <td>681.08</td>\n",
       "      <td>689.82</td>\n",
       "      <td>669.75</td>\n",
       "      <td>1.432981e+09</td>\n",
       "      <td>1.457932e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-21</th>\n",
       "      <td>679.93</td>\n",
       "      <td>690.99</td>\n",
       "      <td>698.32</td>\n",
       "      <td>679.58</td>\n",
       "      <td>1.362043e+09</td>\n",
       "      <td>1.473500e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-22</th>\n",
       "      <td>691.17</td>\n",
       "      <td>683.74</td>\n",
       "      <td>694.40</td>\n",
       "      <td>679.61</td>\n",
       "      <td>1.055673e+09</td>\n",
       "      <td>1.086874e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-23</th>\n",
       "      <td>680.21</td>\n",
       "      <td>682.01</td>\n",
       "      <td>694.60</td>\n",
       "      <td>676.98</td>\n",
       "      <td>1.290463e+09</td>\n",
       "      <td>1.344427e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-24</th>\n",
       "      <td>680.82</td>\n",
       "      <td>681.85</td>\n",
       "      <td>689.15</td>\n",
       "      <td>680.82</td>\n",
       "      <td>9.761286e+08</td>\n",
       "      <td>1.032188e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-27</th>\n",
       "      <td>683.02</td>\n",
       "      <td>701.59</td>\n",
       "      <td>705.01</td>\n",
       "      <td>678.18</td>\n",
       "      <td>1.883161e+09</td>\n",
       "      <td>2.017926e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-28</th>\n",
       "      <td>699.00</td>\n",
       "      <td>702.00</td>\n",
       "      <td>707.70</td>\n",
       "      <td>694.65</td>\n",
       "      <td>1.554425e+09</td>\n",
       "      <td>1.645381e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-29</th>\n",
       "      <td>696.35</td>\n",
       "      <td>698.50</td>\n",
       "      <td>707.13</td>\n",
       "      <td>695.27</td>\n",
       "      <td>1.254053e+09</td>\n",
       "      <td>1.352525e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-30</th>\n",
       "      <td>694.77</td>\n",
       "      <td>689.51</td>\n",
       "      <td>695.08</td>\n",
       "      <td>684.47</td>\n",
       "      <td>1.068399e+09</td>\n",
       "      <td>1.162229e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-31</th>\n",
       "      <td>690.32</td>\n",
       "      <td>685.71</td>\n",
       "      <td>694.97</td>\n",
       "      <td>685.50</td>\n",
       "      <td>8.948725e+08</td>\n",
       "      <td>9.516583e+09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-03</th>\n",
       "      <td>689.98</td>\n",
       "      <td>685.89</td>\n",
       "      <td>700.20</td>\n",
       "      <td>683.43</td>\n",
       "      <td>1.254532e+09</td>\n",
       "      <td>1.366330e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-04</th>\n",
       "      <td>684.42</td>\n",
       "      <td>683.69</td>\n",
       "      <td>687.07</td>\n",
       "      <td>678.77</td>\n",
       "      <td>1.057139e+09</td>\n",
       "      <td>1.117487e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-05</th>\n",
       "      <td>692.30</td>\n",
       "      <td>689.06</td>\n",
       "      <td>699.02</td>\n",
       "      <td>687.64</td>\n",
       "      <td>1.253658e+09</td>\n",
       "      <td>1.396414e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-06</th>\n",
       "      <td>688.61</td>\n",
       "      <td>682.11</td>\n",
       "      <td>695.27</td>\n",
       "      <td>681.31</td>\n",
       "      <td>1.162038e+09</td>\n",
       "      <td>1.242437e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-10</th>\n",
       "      <td>681.33</td>\n",
       "      <td>673.34</td>\n",
       "      <td>683.00</td>\n",
       "      <td>658.95</td>\n",
       "      <td>1.429686e+09</td>\n",
       "      <td>1.490594e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-11</th>\n",
       "      <td>673.46</td>\n",
       "      <td>708.90</td>\n",
       "      <td>710.95</td>\n",
       "      <td>673.18</td>\n",
       "      <td>2.445364e+09</td>\n",
       "      <td>2.566156e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-12</th>\n",
       "      <td>705.10</td>\n",
       "      <td>700.17</td>\n",
       "      <td>710.61</td>\n",
       "      <td>698.75</td>\n",
       "      <td>1.631876e+09</td>\n",
       "      <td>1.750094e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-13</th>\n",
       "      <td>699.75</td>\n",
       "      <td>704.99</td>\n",
       "      <td>711.03</td>\n",
       "      <td>698.35</td>\n",
       "      <td>1.611705e+09</td>\n",
       "      <td>1.750127e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-14</th>\n",
       "      <td>705.81</td>\n",
       "      <td>690.91</td>\n",
       "      <td>709.57</td>\n",
       "      <td>690.24</td>\n",
       "      <td>1.523027e+09</td>\n",
       "      <td>1.619984e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-17</th>\n",
       "      <td>691.22</td>\n",
       "      <td>695.93</td>\n",
       "      <td>699.74</td>\n",
       "      <td>690.84</td>\n",
       "      <td>1.174840e+09</td>\n",
       "      <td>1.271693e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-18</th>\n",
       "      <td>697.94</td>\n",
       "      <td>694.83</td>\n",
       "      <td>698.45</td>\n",
       "      <td>688.16</td>\n",
       "      <td>1.054121e+09</td>\n",
       "      <td>1.146494e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-19</th>\n",
       "      <td>738.12</td>\n",
       "      <td>709.85</td>\n",
       "      <td>741.66</td>\n",
       "      <td>709.65</td>\n",
       "      <td>2.751867e+09</td>\n",
       "      <td>3.223992e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-20</th>\n",
       "      <td>708.11</td>\n",
       "      <td>752.38</td>\n",
       "      <td>767.04</td>\n",
       "      <td>707.54</td>\n",
       "      <td>4.521614e+09</td>\n",
       "      <td>5.362061e+10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-21</th>\n",
       "      <td>755.29</td>\n",
       "      <td>763.68</td>\n",
       "      <td>771.84</td>\n",
       "      <td>753.79</td>\n",
       "      <td>3.563006e+09</td>\n",
       "      <td>4.521385e+10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>999 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               open    close     high      low        volume         money\n",
       "2015-05-19  1518.04  1632.28  1659.57  1518.04  3.772612e+09  9.309065e+10\n",
       "2015-05-20  1637.58  1604.66  1637.58  1602.00  2.828233e+09  7.147268e+10\n",
       "2015-05-21  1603.09  1601.81  1610.02  1582.24  1.858109e+09  4.617736e+10\n",
       "2015-05-22  1619.44  1653.20  1681.65  1614.60  3.418169e+09  8.649188e+10\n",
       "2015-05-25  1658.89  1700.70  1730.00  1658.89  3.803496e+09  9.765779e+10\n",
       "2015-05-26  1710.75  1720.23  1735.71  1667.81  4.057747e+09  9.964947e+10\n",
       "2015-05-27  1722.82  1716.63  1746.18  1705.79  3.367540e+09  8.518020e+10\n",
       "2015-05-28  1713.73  1561.57  1717.02  1561.08  3.846429e+09  9.534386e+10\n",
       "2015-05-29  1571.14  1544.43  1591.32  1516.40  2.814375e+09  6.608362e+10\n",
       "2015-06-01  1545.85  1628.47  1650.87  1524.92  3.083108e+09  7.413112e+10\n",
       "2015-06-02  1621.63  1622.80  1636.12  1595.51  2.506534e+09  6.052673e+10\n",
       "2015-06-03  1627.73  1613.43  1653.87  1604.61  2.415140e+09  6.011070e+10\n",
       "2015-06-04  1616.12  1645.17  1658.33  1539.24  3.140065e+09  7.856293e+10\n",
       "2015-06-05  1679.26  1637.92  1687.32  1610.20  3.208125e+09  8.120543e+10\n",
       "2015-06-08  1640.19  1717.10  1722.04  1626.97  4.173555e+09  1.089132e+11\n",
       "2015-06-09  1730.30  1681.95  1734.67  1664.66  2.873395e+09  7.781870e+10\n",
       "2015-06-10  1665.51  1662.42  1682.94  1651.48  2.090365e+09  5.493834e+10\n",
       "2015-06-11  1658.97  1639.59  1661.39  1627.61  1.853819e+09  4.830030e+10\n",
       "2015-06-12  1647.49  1639.83  1666.54  1632.67  1.925206e+09  4.906892e+10\n",
       "2015-06-15  1667.83  1604.23  1673.87  1601.46  2.802076e+09  7.212277e+10\n",
       "2015-06-16  1593.45  1583.84  1634.43  1566.35  2.327779e+09  5.824746e+10\n",
       "2015-06-17  1587.13  1589.90  1596.17  1543.04  1.991538e+09  4.899048e+10\n",
       "2015-06-18  1576.22  1508.40  1578.16  1508.29  1.845064e+09  4.558884e+10\n",
       "2015-06-19  1487.18  1434.46  1536.65  1434.16  2.056593e+09  4.892117e+10\n",
       "2015-06-23  1441.61  1489.43  1492.25  1396.08  2.237090e+09  5.208910e+10\n",
       "2015-06-24  1496.18  1489.75  1496.18  1457.48  2.101682e+09  5.129546e+10\n",
       "2015-06-25  1493.68  1446.64  1518.43  1439.33  2.355345e+09  5.771941e+10\n",
       "2015-06-26  1414.17  1307.03  1470.29  1301.67  3.141867e+09  7.027144e+10\n",
       "2015-06-29  1348.72  1214.23  1348.72  1177.96  3.638394e+09  7.542973e+10\n",
       "2015-06-30  1214.13  1324.61  1325.17  1159.07  3.557366e+09  7.262728e+10\n",
       "...             ...      ...      ...      ...           ...           ...\n",
       "2019-05-10   695.88   715.19   718.16   682.53  2.759147e+09  2.951191e+10\n",
       "2019-05-13   702.67   698.74   707.17   696.02  1.483093e+09  1.567958e+10\n",
       "2019-05-14   690.40   691.11   705.39   690.28  1.476701e+09  1.554321e+10\n",
       "2019-05-15   697.74   703.60   706.68   695.75  1.555859e+09  1.707681e+10\n",
       "2019-05-16   702.16   703.59   706.98   697.41  1.233870e+09  1.275443e+10\n",
       "2019-05-17   704.88   674.07   705.42   669.43  1.798740e+09  1.803187e+10\n",
       "2019-05-20   670.19   681.08   689.82   669.75  1.432981e+09  1.457932e+10\n",
       "2019-05-21   679.93   690.99   698.32   679.58  1.362043e+09  1.473500e+10\n",
       "2019-05-22   691.17   683.74   694.40   679.61  1.055673e+09  1.086874e+10\n",
       "2019-05-23   680.21   682.01   694.60   676.98  1.290463e+09  1.344427e+10\n",
       "2019-05-24   680.82   681.85   689.15   680.82  9.761286e+08  1.032188e+10\n",
       "2019-05-27   683.02   701.59   705.01   678.18  1.883161e+09  2.017926e+10\n",
       "2019-05-28   699.00   702.00   707.70   694.65  1.554425e+09  1.645381e+10\n",
       "2019-05-29   696.35   698.50   707.13   695.27  1.254053e+09  1.352525e+10\n",
       "2019-05-30   694.77   689.51   695.08   684.47  1.068399e+09  1.162229e+10\n",
       "2019-05-31   690.32   685.71   694.97   685.50  8.948725e+08  9.516583e+09\n",
       "2019-06-03   689.98   685.89   700.20   683.43  1.254532e+09  1.366330e+10\n",
       "2019-06-04   684.42   683.69   687.07   678.77  1.057139e+09  1.117487e+10\n",
       "2019-06-05   692.30   689.06   699.02   687.64  1.253658e+09  1.396414e+10\n",
       "2019-06-06   688.61   682.11   695.27   681.31  1.162038e+09  1.242437e+10\n",
       "2019-06-10   681.33   673.34   683.00   658.95  1.429686e+09  1.490594e+10\n",
       "2019-06-11   673.46   708.90   710.95   673.18  2.445364e+09  2.566156e+10\n",
       "2019-06-12   705.10   700.17   710.61   698.75  1.631876e+09  1.750094e+10\n",
       "2019-06-13   699.75   704.99   711.03   698.35  1.611705e+09  1.750127e+10\n",
       "2019-06-14   705.81   690.91   709.57   690.24  1.523027e+09  1.619984e+10\n",
       "2019-06-17   691.22   695.93   699.74   690.84  1.174840e+09  1.271693e+10\n",
       "2019-06-18   697.94   694.83   698.45   688.16  1.054121e+09  1.146494e+10\n",
       "2019-06-19   738.12   709.85   741.66   709.65  2.751867e+09  3.223992e+10\n",
       "2019-06-20   708.11   752.38   767.04   707.54  4.521614e+09  5.362061e+10\n",
       "2019-06-21   755.29   763.68   771.84   753.79  3.563006e+09  4.521385e+10\n",
       "\n",
       "[999 rows x 6 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_zq.dropna()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "index_sz50_1 = get_price(\"000016.XSHG\",start_date=\"2005-01-04\",end_date=\"2019-06-21\",frequency='daily',fq='pre')\n",
    "index_sz50_2 = get_price(\"000016.XSHG\",start_date=\"2005-01-04\",end_date=\"2019-06-21\",frequency='daily',fq=None)\n",
    "index_sz50_3 = get_price(\"000016.XSHG\",start_date=\"2005-01-04\",end_date=\"2019-06-21\",frequency='daily',fq='post')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "               open    close     high      low        volume         money\n",
      "2019-06-17  2785.47  2793.70  2813.45  2785.47  2.047785e+09  2.917243e+10\n",
      "2019-06-18  2800.83  2806.45  2809.87  2785.38  2.167640e+09  2.883370e+10\n",
      "2019-06-19  2872.07  2842.74  2879.23  2842.42  4.116011e+09  6.170081e+10\n",
      "2019-06-20  2847.32  2942.63  2954.03  2846.44  5.736037e+09  8.726486e+10\n",
      "2019-06-21  2939.65  2938.77  2958.23  2929.90  4.656020e+09  6.875173e+10\n",
      "               open    close     high      low        volume         money\n",
      "2019-06-17  2785.47  2793.70  2813.45  2785.47  2.047785e+09  2.917243e+10\n",
      "2019-06-18  2800.83  2806.45  2809.87  2785.38  2.167640e+09  2.883370e+10\n",
      "2019-06-19  2872.07  2842.74  2879.23  2842.42  4.116011e+09  6.170081e+10\n",
      "2019-06-20  2847.32  2942.63  2954.03  2846.44  5.736037e+09  8.726486e+10\n",
      "2019-06-21  2939.65  2938.77  2958.23  2929.90  4.656020e+09  6.875173e+10\n",
      "               open    close     high      low        volume         money\n",
      "2019-06-17  2785.47  2793.70  2813.45  2785.47  2.047785e+09  2.917243e+10\n",
      "2019-06-18  2800.83  2806.45  2809.87  2785.38  2.167640e+09  2.883370e+10\n",
      "2019-06-19  2872.07  2842.74  2879.23  2842.42  4.116011e+09  6.170081e+10\n",
      "2019-06-20  2847.32  2942.63  2954.03  2846.44  5.736037e+09  8.726486e+10\n",
      "2019-06-21  2939.65  2938.77  2958.23  2929.90  4.656020e+09  6.875173e+10\n"
     ]
    }
   ],
   "source": [
    "print(index_sz50_1.tail(5))\n",
    "print(index_sz50_2.tail(5))\n",
    "print(index_sz50_3.tail(5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "freq = '1M'\n",
    "index_sz50_m = index_sz50_1[[\"open\"]].resample(rule=freq).first()\n",
    "index_sz50_m['high'] = index_sz50_1['high'].resample(rule=freq).max()\n",
    "index_sz50_m['low'] = index_sz50_1['low'].resample(rule=freq).min()\n",
    "index_sz50_m['close'] = index_sz50_1['close'].resample(rule=freq).last()\n",
    "index_sz50_m['vol'] = index_sz50_1['volume'].resample(rule=freq).sum()\n",
    "index_sz50_m['money'] = index_sz50_1['money'].resample(rule=freq).sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    174.00\n",
       "mean       1.02\n",
       "std        8.76\n",
       "min      -27.75\n",
       "25%       -3.60\n",
       "50%        1.37\n",
       "75%        5.21\n",
       "max       33.29\n",
       "Name: pcg, dtype: float64"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "index_sz50_m['pcg'] = (index_sz50_m['close'] - index_sz50_m['open']) / index_sz50_m['open'] * 100\n",
    "index_sz50_m['pcg'].describe()\n",
    "#index_sz50_m['pcg'] = index_sz50_m['pcg'].map(lambda x: str(x) + \"%\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>close</th>\n",
       "      <th>vol</th>\n",
       "      <th>money</th>\n",
       "      <th>pcg</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2005-01-31</th>\n",
       "      <td>836.99</td>\n",
       "      <td>851.24</td>\n",
       "      <td>798.35</td>\n",
       "      <td>813.75</td>\n",
       "      <td>6.81e+09</td>\n",
       "      <td>3.53e+10</td>\n",
       "      <td>-2.7766162080789507%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-02-28</th>\n",
       "      <td>812.56</td>\n",
       "      <td>889.98</td>\n",
       "      <td>812.15</td>\n",
       "      <td>868.89</td>\n",
       "      <td>7.25e+09</td>\n",
       "      <td>4.08e+10</td>\n",
       "      <td>6.932411145023143%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-03-31</th>\n",
       "      <td>868.37</td>\n",
       "      <td>880.49</td>\n",
       "      <td>783.98</td>\n",
       "      <td>795.67</td>\n",
       "      <td>9.08e+09</td>\n",
       "      <td>5.19e+10</td>\n",
       "      <td>-8.372007324066935%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-04-30</th>\n",
       "      <td>794.95</td>\n",
       "      <td>842.48</td>\n",
       "      <td>773.38</td>\n",
       "      <td>789.73</td>\n",
       "      <td>9.60e+09</td>\n",
       "      <td>5.35e+10</td>\n",
       "      <td>-0.6566450720171114%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-05-31</th>\n",
       "      <td>790.83</td>\n",
       "      <td>795.09</td>\n",
       "      <td>717.82</td>\n",
       "      <td>731.00</td>\n",
       "      <td>5.54e+09</td>\n",
       "      <td>2.80e+10</td>\n",
       "      <td>-7.565469190597225%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-06-30</th>\n",
       "      <td>730.12</td>\n",
       "      <td>790.39</td>\n",
       "      <td>693.53</td>\n",
       "      <td>758.72</td>\n",
       "      <td>1.30e+10</td>\n",
       "      <td>6.34e+10</td>\n",
       "      <td>3.917164301758618%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-07-31</th>\n",
       "      <td>756.24</td>\n",
       "      <td>797.39</td>\n",
       "      <td>721.85</td>\n",
       "      <td>788.63</td>\n",
       "      <td>9.83e+09</td>\n",
       "      <td>4.77e+10</td>\n",
       "      <td>4.28303184174336%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-08-31</th>\n",
       "      <td>788.22</td>\n",
       "      <td>843.32</td>\n",
       "      <td>786.88</td>\n",
       "      <td>816.75</td>\n",
       "      <td>1.65e+10</td>\n",
       "      <td>8.18e+10</td>\n",
       "      <td>3.61954784197305%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-09-30</th>\n",
       "      <td>817.23</td>\n",
       "      <td>835.00</td>\n",
       "      <td>780.76</td>\n",
       "      <td>793.65</td>\n",
       "      <td>1.13e+10</td>\n",
       "      <td>5.69e+10</td>\n",
       "      <td>-2.8853566315480395%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-10-31</th>\n",
       "      <td>792.76</td>\n",
       "      <td>797.97</td>\n",
       "      <td>742.23</td>\n",
       "      <td>759.24</td>\n",
       "      <td>6.51e+09</td>\n",
       "      <td>3.17e+10</td>\n",
       "      <td>-4.228265805540135%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-11-30</th>\n",
       "      <td>758.27</td>\n",
       "      <td>770.84</td>\n",
       "      <td>733.03</td>\n",
       "      <td>759.63</td>\n",
       "      <td>9.62e+09</td>\n",
       "      <td>4.10e+10</td>\n",
       "      <td>0.1793556384928869%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2005-12-31</th>\n",
       "      <td>759.35</td>\n",
       "      <td>804.61</td>\n",
       "      <td>748.01</td>\n",
       "      <td>796.40</td>\n",
       "      <td>1.01e+10</td>\n",
       "      <td>4.87e+10</td>\n",
       "      <td>4.879172976888122%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-01-31</th>\n",
       "      <td>801.41</td>\n",
       "      <td>847.16</td>\n",
       "      <td>800.21</td>\n",
       "      <td>846.99</td>\n",
       "      <td>1.33e+10</td>\n",
       "      <td>7.04e+10</td>\n",
       "      <td>5.687475823860452%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-02-28</th>\n",
       "      <td>849.51</td>\n",
       "      <td>894.83</td>\n",
       "      <td>848.43</td>\n",
       "      <td>892.90</td>\n",
       "      <td>1.41e+10</td>\n",
       "      <td>7.42e+10</td>\n",
       "      <td>5.10765029252157%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-03-31</th>\n",
       "      <td>893.49</td>\n",
       "      <td>897.10</td>\n",
       "      <td>852.09</td>\n",
       "      <td>878.37</td>\n",
       "      <td>1.46e+10</td>\n",
       "      <td>7.88e+10</td>\n",
       "      <td>-1.6922405399053158%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-04-30</th>\n",
       "      <td>879.54</td>\n",
       "      <td>966.32</td>\n",
       "      <td>879.54</td>\n",
       "      <td>964.45</td>\n",
       "      <td>2.20e+10</td>\n",
       "      <td>1.24e+11</td>\n",
       "      <td>9.653909998408269%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-05-31</th>\n",
       "      <td>968.92</td>\n",
       "      <td>1117.43</td>\n",
       "      <td>968.92</td>\n",
       "      <td>1078.86</td>\n",
       "      <td>3.22e+10</td>\n",
       "      <td>1.98e+11</td>\n",
       "      <td>11.346654006522721%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-06-30</th>\n",
       "      <td>1076.79</td>\n",
       "      <td>1117.05</td>\n",
       "      <td>1011.89</td>\n",
       "      <td>1102.70</td>\n",
       "      <td>2.46e+10</td>\n",
       "      <td>1.49e+11</td>\n",
       "      <td>2.4062259122020153%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-07-31</th>\n",
       "      <td>1108.03</td>\n",
       "      <td>1129.54</td>\n",
       "      <td>1019.46</td>\n",
       "      <td>1020.54</td>\n",
       "      <td>1.79e+10</td>\n",
       "      <td>1.11e+11</td>\n",
       "      <td>-7.895995595787118%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-08-31</th>\n",
       "      <td>1018.68</td>\n",
       "      <td>1060.61</td>\n",
       "      <td>974.84</td>\n",
       "      <td>1048.58</td>\n",
       "      <td>1.40e+10</td>\n",
       "      <td>8.18e+10</td>\n",
       "      <td>2.9351710056151075%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-09-30</th>\n",
       "      <td>1047.81</td>\n",
       "      <td>1117.57</td>\n",
       "      <td>1032.53</td>\n",
       "      <td>1115.72</td>\n",
       "      <td>2.05e+10</td>\n",
       "      <td>1.16e+11</td>\n",
       "      <td>6.4811368473292%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-10-31</th>\n",
       "      <td>1134.40</td>\n",
       "      <td>1194.17</td>\n",
       "      <td>1122.22</td>\n",
       "      <td>1193.84</td>\n",
       "      <td>2.24e+10</td>\n",
       "      <td>1.22e+11</td>\n",
       "      <td>5.239774330042297%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-11-30</th>\n",
       "      <td>1194.64</td>\n",
       "      <td>1425.79</td>\n",
       "      <td>1191.88</td>\n",
       "      <td>1425.21</td>\n",
       "      <td>4.86e+10</td>\n",
       "      <td>2.81e+11</td>\n",
       "      <td>19.300375008370715%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2006-12-31</th>\n",
       "      <td>1427.75</td>\n",
       "      <td>1819.04</td>\n",
       "      <td>1420.60</td>\n",
       "      <td>1805.31</td>\n",
       "      <td>5.95e+10</td>\n",
       "      <td>3.91e+11</td>\n",
       "      <td>26.444405533181577%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007-01-31</th>\n",
       "      <td>1842.63</td>\n",
       "      <td>2251.57</td>\n",
       "      <td>1791.64</td>\n",
       "      <td>2052.91</td>\n",
       "      <td>7.07e+10</td>\n",
       "      <td>6.08e+11</td>\n",
       "      <td>11.411949224749392%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007-02-28</th>\n",
       "      <td>2021.44</td>\n",
       "      <td>2266.43</td>\n",
       "      <td>1824.60</td>\n",
       "      <td>2096.23</td>\n",
       "      <td>4.07e+10</td>\n",
       "      <td>3.75e+11</td>\n",
       "      <td>3.6998377394332733%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007-03-31</th>\n",
       "      <td>2097.10</td>\n",
       "      <td>2351.35</td>\n",
       "      <td>1978.57</td>\n",
       "      <td>2288.26</td>\n",
       "      <td>6.19e+10</td>\n",
       "      <td>6.05e+11</td>\n",
       "      <td>9.115445138524644%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007-04-30</th>\n",
       "      <td>2299.49</td>\n",
       "      <td>2768.95</td>\n",
       "      <td>2299.49</td>\n",
       "      <td>2757.83</td>\n",
       "      <td>7.57e+10</td>\n",
       "      <td>8.90e+11</td>\n",
       "      <td>19.932245845817995%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007-05-31</th>\n",
       "      <td>2827.12</td>\n",
       "      <td>3051.07</td>\n",
       "      <td>2731.82</td>\n",
       "      <td>2940.37</td>\n",
       "      <td>7.56e+10</td>\n",
       "      <td>1.01e+12</td>\n",
       "      <td>4.005843402473189%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2007-06-30</th>\n",
       "      <td>2963.47</td>\n",
       "      <td>3155.97</td>\n",
       "      <td>2493.31</td>\n",
       "      <td>2915.88</td>\n",
       "      <td>6.67e+10</td>\n",
       "      <td>9.57e+11</td>\n",
       "      <td>-1.605887692468616%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-01-31</th>\n",
       "      <td>2285.27</td>\n",
       "      <td>2371.93</td>\n",
       "      <td>2282.24</td>\n",
       "      <td>2364.02</td>\n",
       "      <td>4.45e+10</td>\n",
       "      <td>4.44e+11</td>\n",
       "      <td>3.445982312812053%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-02-28</th>\n",
       "      <td>2367.53</td>\n",
       "      <td>2410.35</td>\n",
       "      <td>2323.91</td>\n",
       "      <td>2370.71</td>\n",
       "      <td>4.96e+10</td>\n",
       "      <td>5.23e+11</td>\n",
       "      <td>0.1343171997820444%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-03-31</th>\n",
       "      <td>2371.65</td>\n",
       "      <td>2383.51</td>\n",
       "      <td>2328.62</td>\n",
       "      <td>2359.75</td>\n",
       "      <td>6.13e+10</td>\n",
       "      <td>6.60e+11</td>\n",
       "      <td>-0.501760377796053%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-04-30</th>\n",
       "      <td>2369.49</td>\n",
       "      <td>2395.12</td>\n",
       "      <td>2311.66</td>\n",
       "      <td>2347.04</td>\n",
       "      <td>5.26e+10</td>\n",
       "      <td>5.91e+11</td>\n",
       "      <td>-0.9474612680365742%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-05-31</th>\n",
       "      <td>2341.75</td>\n",
       "      <td>2502.85</td>\n",
       "      <td>2297.45</td>\n",
       "      <td>2479.08</td>\n",
       "      <td>5.08e+10</td>\n",
       "      <td>5.96e+11</td>\n",
       "      <td>5.864417636383044%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-06-30</th>\n",
       "      <td>2476.21</td>\n",
       "      <td>2560.86</td>\n",
       "      <td>2442.27</td>\n",
       "      <td>2549.97</td>\n",
       "      <td>5.51e+10</td>\n",
       "      <td>7.04e+11</td>\n",
       "      <td>2.978745744504697%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-07-31</th>\n",
       "      <td>2550.50</td>\n",
       "      <td>2667.79</td>\n",
       "      <td>2506.68</td>\n",
       "      <td>2638.12</td>\n",
       "      <td>6.80e+10</td>\n",
       "      <td>8.52e+11</td>\n",
       "      <td>3.4354048225838025%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-08-31</th>\n",
       "      <td>2640.87</td>\n",
       "      <td>2766.79</td>\n",
       "      <td>2566.57</td>\n",
       "      <td>2714.63</td>\n",
       "      <td>7.27e+10</td>\n",
       "      <td>9.37e+11</td>\n",
       "      <td>2.7930189672342913%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-09-30</th>\n",
       "      <td>2716.05</td>\n",
       "      <td>2738.59</td>\n",
       "      <td>2653.46</td>\n",
       "      <td>2672.33</td>\n",
       "      <td>5.94e+10</td>\n",
       "      <td>7.70e+11</td>\n",
       "      <td>-1.6096905432521587%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-10-31</th>\n",
       "      <td>2736.83</td>\n",
       "      <td>2822.59</td>\n",
       "      <td>2671.94</td>\n",
       "      <td>2793.71</td>\n",
       "      <td>4.82e+10</td>\n",
       "      <td>6.28e+11</td>\n",
       "      <td>2.0783168848631486%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-11-30</th>\n",
       "      <td>2795.19</td>\n",
       "      <td>3038.28</td>\n",
       "      <td>2770.12</td>\n",
       "      <td>2863.45</td>\n",
       "      <td>9.92e+10</td>\n",
       "      <td>1.34e+12</td>\n",
       "      <td>2.4420522397404025%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017-12-31</th>\n",
       "      <td>2861.90</td>\n",
       "      <td>2922.33</td>\n",
       "      <td>2815.82</td>\n",
       "      <td>2860.44</td>\n",
       "      <td>5.95e+10</td>\n",
       "      <td>8.66e+11</td>\n",
       "      <td>-0.05101505992522577%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-01-31</th>\n",
       "      <td>2867.53</td>\n",
       "      <td>3202.47</td>\n",
       "      <td>2867.53</td>\n",
       "      <td>3116.83</td>\n",
       "      <td>1.46e+11</td>\n",
       "      <td>1.88e+12</td>\n",
       "      <td>8.693893350723435%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-02-28</th>\n",
       "      <td>3120.13</td>\n",
       "      <td>3181.59</td>\n",
       "      <td>2724.59</td>\n",
       "      <td>2878.67</td>\n",
       "      <td>8.86e+10</td>\n",
       "      <td>1.10e+12</td>\n",
       "      <td>-7.73878011493111%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-03-31</th>\n",
       "      <td>2859.09</td>\n",
       "      <td>2932.22</td>\n",
       "      <td>2657.49</td>\n",
       "      <td>2722.15</td>\n",
       "      <td>7.78e+10</td>\n",
       "      <td>9.86e+11</td>\n",
       "      <td>-4.789635863159258%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-04-30</th>\n",
       "      <td>2717.12</td>\n",
       "      <td>2803.88</td>\n",
       "      <td>2613.53</td>\n",
       "      <td>2653.54</td>\n",
       "      <td>5.31e+10</td>\n",
       "      <td>6.76e+11</td>\n",
       "      <td>-2.339977623365914%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-05-31</th>\n",
       "      <td>2662.08</td>\n",
       "      <td>2761.72</td>\n",
       "      <td>2604.91</td>\n",
       "      <td>2658.29</td>\n",
       "      <td>5.19e+10</td>\n",
       "      <td>6.84e+11</td>\n",
       "      <td>-0.14236987618704036%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-06-30</th>\n",
       "      <td>2652.25</td>\n",
       "      <td>2717.06</td>\n",
       "      <td>2418.30</td>\n",
       "      <td>2479.91</td>\n",
       "      <td>4.88e+10</td>\n",
       "      <td>7.34e+11</td>\n",
       "      <td>-6.497879159204454%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-07-31</th>\n",
       "      <td>2473.31</td>\n",
       "      <td>2579.59</td>\n",
       "      <td>2331.84</td>\n",
       "      <td>2545.12</td>\n",
       "      <td>5.52e+10</td>\n",
       "      <td>7.16e+11</td>\n",
       "      <td>2.903396662771749%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-08-31</th>\n",
       "      <td>2557.61</td>\n",
       "      <td>2570.31</td>\n",
       "      <td>2367.05</td>\n",
       "      <td>2474.48</td>\n",
       "      <td>5.25e+10</td>\n",
       "      <td>6.68e+11</td>\n",
       "      <td>-3.25030008484484%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-09-30</th>\n",
       "      <td>2461.86</td>\n",
       "      <td>2618.83</td>\n",
       "      <td>2373.04</td>\n",
       "      <td>2606.67</td>\n",
       "      <td>4.30e+10</td>\n",
       "      <td>5.50e+11</td>\n",
       "      <td>5.882137895737367%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-10-31</th>\n",
       "      <td>2544.49</td>\n",
       "      <td>2566.63</td>\n",
       "      <td>2344.98</td>\n",
       "      <td>2451.12</td>\n",
       "      <td>5.35e+10</td>\n",
       "      <td>7.30e+11</td>\n",
       "      <td>-3.6694976203482783%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-11-30</th>\n",
       "      <td>2474.27</td>\n",
       "      <td>2544.19</td>\n",
       "      <td>2387.93</td>\n",
       "      <td>2428.04</td>\n",
       "      <td>5.47e+10</td>\n",
       "      <td>6.81e+11</td>\n",
       "      <td>-1.86842988032834%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2018-12-31</th>\n",
       "      <td>2492.43</td>\n",
       "      <td>2500.57</td>\n",
       "      <td>2256.47</td>\n",
       "      <td>2293.10</td>\n",
       "      <td>4.36e+10</td>\n",
       "      <td>5.54e+11</td>\n",
       "      <td>-7.997416176181475%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-01-31</th>\n",
       "      <td>2298.18</td>\n",
       "      <td>2487.10</td>\n",
       "      <td>2249.37</td>\n",
       "      <td>2483.47</td>\n",
       "      <td>4.85e+10</td>\n",
       "      <td>6.31e+11</td>\n",
       "      <td>8.062466821571851%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-02-28</th>\n",
       "      <td>2502.10</td>\n",
       "      <td>2804.16</td>\n",
       "      <td>2479.34</td>\n",
       "      <td>2743.97</td>\n",
       "      <td>6.58e+10</td>\n",
       "      <td>8.46e+11</td>\n",
       "      <td>9.666679988809395%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-03-31</th>\n",
       "      <td>2764.95</td>\n",
       "      <td>2907.82</td>\n",
       "      <td>2670.79</td>\n",
       "      <td>2838.51</td>\n",
       "      <td>1.12e+11</td>\n",
       "      <td>1.55e+12</td>\n",
       "      <td>2.660445939347923%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-04-30</th>\n",
       "      <td>2860.14</td>\n",
       "      <td>3048.82</td>\n",
       "      <td>2860.14</td>\n",
       "      <td>2945.24</td>\n",
       "      <td>1.07e+11</td>\n",
       "      <td>1.44e+12</td>\n",
       "      <td>2.975378827609834%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-05-31</th>\n",
       "      <td>2853.88</td>\n",
       "      <td>2867.60</td>\n",
       "      <td>2667.38</td>\n",
       "      <td>2728.95</td>\n",
       "      <td>6.05e+10</td>\n",
       "      <td>9.03e+11</td>\n",
       "      <td>-4.377549161142034%</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2019-06-30</th>\n",
       "      <td>2737.81</td>\n",
       "      <td>2958.23</td>\n",
       "      <td>2701.92</td>\n",
       "      <td>2938.77</td>\n",
       "      <td>4.28e+10</td>\n",
       "      <td>6.13e+11</td>\n",
       "      <td>7.340173350232486%</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>174 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               open     high      low    close       vol     money  \\\n",
       "2005-01-31   836.99   851.24   798.35   813.75  6.81e+09  3.53e+10   \n",
       "2005-02-28   812.56   889.98   812.15   868.89  7.25e+09  4.08e+10   \n",
       "2005-03-31   868.37   880.49   783.98   795.67  9.08e+09  5.19e+10   \n",
       "2005-04-30   794.95   842.48   773.38   789.73  9.60e+09  5.35e+10   \n",
       "2005-05-31   790.83   795.09   717.82   731.00  5.54e+09  2.80e+10   \n",
       "2005-06-30   730.12   790.39   693.53   758.72  1.30e+10  6.34e+10   \n",
       "2005-07-31   756.24   797.39   721.85   788.63  9.83e+09  4.77e+10   \n",
       "2005-08-31   788.22   843.32   786.88   816.75  1.65e+10  8.18e+10   \n",
       "2005-09-30   817.23   835.00   780.76   793.65  1.13e+10  5.69e+10   \n",
       "2005-10-31   792.76   797.97   742.23   759.24  6.51e+09  3.17e+10   \n",
       "2005-11-30   758.27   770.84   733.03   759.63  9.62e+09  4.10e+10   \n",
       "2005-12-31   759.35   804.61   748.01   796.40  1.01e+10  4.87e+10   \n",
       "2006-01-31   801.41   847.16   800.21   846.99  1.33e+10  7.04e+10   \n",
       "2006-02-28   849.51   894.83   848.43   892.90  1.41e+10  7.42e+10   \n",
       "2006-03-31   893.49   897.10   852.09   878.37  1.46e+10  7.88e+10   \n",
       "2006-04-30   879.54   966.32   879.54   964.45  2.20e+10  1.24e+11   \n",
       "2006-05-31   968.92  1117.43   968.92  1078.86  3.22e+10  1.98e+11   \n",
       "2006-06-30  1076.79  1117.05  1011.89  1102.70  2.46e+10  1.49e+11   \n",
       "2006-07-31  1108.03  1129.54  1019.46  1020.54  1.79e+10  1.11e+11   \n",
       "2006-08-31  1018.68  1060.61   974.84  1048.58  1.40e+10  8.18e+10   \n",
       "2006-09-30  1047.81  1117.57  1032.53  1115.72  2.05e+10  1.16e+11   \n",
       "2006-10-31  1134.40  1194.17  1122.22  1193.84  2.24e+10  1.22e+11   \n",
       "2006-11-30  1194.64  1425.79  1191.88  1425.21  4.86e+10  2.81e+11   \n",
       "2006-12-31  1427.75  1819.04  1420.60  1805.31  5.95e+10  3.91e+11   \n",
       "2007-01-31  1842.63  2251.57  1791.64  2052.91  7.07e+10  6.08e+11   \n",
       "2007-02-28  2021.44  2266.43  1824.60  2096.23  4.07e+10  3.75e+11   \n",
       "2007-03-31  2097.10  2351.35  1978.57  2288.26  6.19e+10  6.05e+11   \n",
       "2007-04-30  2299.49  2768.95  2299.49  2757.83  7.57e+10  8.90e+11   \n",
       "2007-05-31  2827.12  3051.07  2731.82  2940.37  7.56e+10  1.01e+12   \n",
       "2007-06-30  2963.47  3155.97  2493.31  2915.88  6.67e+10  9.57e+11   \n",
       "...             ...      ...      ...      ...       ...       ...   \n",
       "2017-01-31  2285.27  2371.93  2282.24  2364.02  4.45e+10  4.44e+11   \n",
       "2017-02-28  2367.53  2410.35  2323.91  2370.71  4.96e+10  5.23e+11   \n",
       "2017-03-31  2371.65  2383.51  2328.62  2359.75  6.13e+10  6.60e+11   \n",
       "2017-04-30  2369.49  2395.12  2311.66  2347.04  5.26e+10  5.91e+11   \n",
       "2017-05-31  2341.75  2502.85  2297.45  2479.08  5.08e+10  5.96e+11   \n",
       "2017-06-30  2476.21  2560.86  2442.27  2549.97  5.51e+10  7.04e+11   \n",
       "2017-07-31  2550.50  2667.79  2506.68  2638.12  6.80e+10  8.52e+11   \n",
       "2017-08-31  2640.87  2766.79  2566.57  2714.63  7.27e+10  9.37e+11   \n",
       "2017-09-30  2716.05  2738.59  2653.46  2672.33  5.94e+10  7.70e+11   \n",
       "2017-10-31  2736.83  2822.59  2671.94  2793.71  4.82e+10  6.28e+11   \n",
       "2017-11-30  2795.19  3038.28  2770.12  2863.45  9.92e+10  1.34e+12   \n",
       "2017-12-31  2861.90  2922.33  2815.82  2860.44  5.95e+10  8.66e+11   \n",
       "2018-01-31  2867.53  3202.47  2867.53  3116.83  1.46e+11  1.88e+12   \n",
       "2018-02-28  3120.13  3181.59  2724.59  2878.67  8.86e+10  1.10e+12   \n",
       "2018-03-31  2859.09  2932.22  2657.49  2722.15  7.78e+10  9.86e+11   \n",
       "2018-04-30  2717.12  2803.88  2613.53  2653.54  5.31e+10  6.76e+11   \n",
       "2018-05-31  2662.08  2761.72  2604.91  2658.29  5.19e+10  6.84e+11   \n",
       "2018-06-30  2652.25  2717.06  2418.30  2479.91  4.88e+10  7.34e+11   \n",
       "2018-07-31  2473.31  2579.59  2331.84  2545.12  5.52e+10  7.16e+11   \n",
       "2018-08-31  2557.61  2570.31  2367.05  2474.48  5.25e+10  6.68e+11   \n",
       "2018-09-30  2461.86  2618.83  2373.04  2606.67  4.30e+10  5.50e+11   \n",
       "2018-10-31  2544.49  2566.63  2344.98  2451.12  5.35e+10  7.30e+11   \n",
       "2018-11-30  2474.27  2544.19  2387.93  2428.04  5.47e+10  6.81e+11   \n",
       "2018-12-31  2492.43  2500.57  2256.47  2293.10  4.36e+10  5.54e+11   \n",
       "2019-01-31  2298.18  2487.10  2249.37  2483.47  4.85e+10  6.31e+11   \n",
       "2019-02-28  2502.10  2804.16  2479.34  2743.97  6.58e+10  8.46e+11   \n",
       "2019-03-31  2764.95  2907.82  2670.79  2838.51  1.12e+11  1.55e+12   \n",
       "2019-04-30  2860.14  3048.82  2860.14  2945.24  1.07e+11  1.44e+12   \n",
       "2019-05-31  2853.88  2867.60  2667.38  2728.95  6.05e+10  9.03e+11   \n",
       "2019-06-30  2737.81  2958.23  2701.92  2938.77  4.28e+10  6.13e+11   \n",
       "\n",
       "                              pcg  \n",
       "2005-01-31   -2.7766162080789507%  \n",
       "2005-02-28     6.932411145023143%  \n",
       "2005-03-31    -8.372007324066935%  \n",
       "2005-04-30   -0.6566450720171114%  \n",
       "2005-05-31    -7.565469190597225%  \n",
       "2005-06-30     3.917164301758618%  \n",
       "2005-07-31      4.28303184174336%  \n",
       "2005-08-31      3.61954784197305%  \n",
       "2005-09-30   -2.8853566315480395%  \n",
       "2005-10-31    -4.228265805540135%  \n",
       "2005-11-30    0.1793556384928869%  \n",
       "2005-12-31     4.879172976888122%  \n",
       "2006-01-31     5.687475823860452%  \n",
       "2006-02-28      5.10765029252157%  \n",
       "2006-03-31   -1.6922405399053158%  \n",
       "2006-04-30     9.653909998408269%  \n",
       "2006-05-31    11.346654006522721%  \n",
       "2006-06-30    2.4062259122020153%  \n",
       "2006-07-31    -7.895995595787118%  \n",
       "2006-08-31    2.9351710056151075%  \n",
       "2006-09-30       6.4811368473292%  \n",
       "2006-10-31     5.239774330042297%  \n",
       "2006-11-30    19.300375008370715%  \n",
       "2006-12-31    26.444405533181577%  \n",
       "2007-01-31    11.411949224749392%  \n",
       "2007-02-28    3.6998377394332733%  \n",
       "2007-03-31     9.115445138524644%  \n",
       "2007-04-30    19.932245845817995%  \n",
       "2007-05-31     4.005843402473189%  \n",
       "2007-06-30    -1.605887692468616%  \n",
       "...                           ...  \n",
       "2017-01-31     3.445982312812053%  \n",
       "2017-02-28    0.1343171997820444%  \n",
       "2017-03-31    -0.501760377796053%  \n",
       "2017-04-30   -0.9474612680365742%  \n",
       "2017-05-31     5.864417636383044%  \n",
       "2017-06-30     2.978745744504697%  \n",
       "2017-07-31    3.4354048225838025%  \n",
       "2017-08-31    2.7930189672342913%  \n",
       "2017-09-30   -1.6096905432521587%  \n",
       "2017-10-31    2.0783168848631486%  \n",
       "2017-11-30    2.4420522397404025%  \n",
       "2017-12-31  -0.05101505992522577%  \n",
       "2018-01-31     8.693893350723435%  \n",
       "2018-02-28     -7.73878011493111%  \n",
       "2018-03-31    -4.789635863159258%  \n",
       "2018-04-30    -2.339977623365914%  \n",
       "2018-05-31  -0.14236987618704036%  \n",
       "2018-06-30    -6.497879159204454%  \n",
       "2018-07-31     2.903396662771749%  \n",
       "2018-08-31     -3.25030008484484%  \n",
       "2018-09-30     5.882137895737367%  \n",
       "2018-10-31   -3.6694976203482783%  \n",
       "2018-11-30     -1.86842988032834%  \n",
       "2018-12-31    -7.997416176181475%  \n",
       "2019-01-31     8.062466821571851%  \n",
       "2019-02-28     9.666679988809395%  \n",
       "2019-03-31     2.660445939347923%  \n",
       "2019-04-30     2.975378827609834%  \n",
       "2019-05-31    -4.377549161142034%  \n",
       "2019-06-30     7.340173350232486%  \n",
       "\n",
       "[174 rows x 7 columns]"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "index_sz50_m"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
